]> git.parisson.com Git - django-social-auth.git/commitdiff
make enabled() actually check whether the LindkedIn backend is enabled in settings.
authorTim Babych <tim.babych@gmail.com>
Mon, 9 Apr 2012 22:45:53 +0000 (01:45 +0300)
committerTim Babych <tim.babych@gmail.com>
Mon, 9 Apr 2012 22:45:53 +0000 (01:45 +0300)
social_auth/backends/contrib/linkedin.py

index ae9271655b1a2d4427cc9b4c2623f2e595d408d8..83506abcc1e511e7179aeba87499598cdeda9501 100644 (file)
@@ -64,8 +64,8 @@ class LinkedinAuth(ConsumerBasedOAuth):
 
     @classmethod
     def enabled(cls):
-        return True
-
+        """Return backend enabled status by checking basic settings"""
+        return setting(cls.SETTINGS_KEY_NAME) and setting(cls.SETTINGS_SECRET_NAME)
 
 def to_dict(xml):
     """Convert XML structure to dict recursively, repeated keys entries