Commits

Erik LaBianca committed d5e1e3f

misc merge cleanup and django 1.3 compat

- add supports_object_permissions and supports_anonymous user to silence deprecation warnings
- repair broken merge results

Comments (0)

Files changed (2)

django_crowd/backend.py

     crowdClient = None
     authenticationToken = None
     principalToken = None
+    # TODO: research supports_object_permissions and supports_anonymous_user and
+    # ensure values are accurate
+    supports_object_permissions = False
+    supports_anonymous_user = False
 
     NAME = "NAME"
     RANDOM_NUMBER = "Random-Number"
     def authenticate(self, username=None, password=None):
         try:
             self.check_client_and_app_authentication()
-            self.principalToken = self.crowdClient.service.authenticatePrincipalSimple(self.authenticationToken, username,
+            self.principalToken = self.crowdClient.service.authenticatePrincipalSimple(self.authenticationToken, 
+                username, password) 
             return self.create_or_update_user(username)
         except WebFault, e:
             return None

django_crowd/middleware.py

-from crowd.backend import CrowdBackend
+from .backend import CrowdBackend
 from datetime import  datetime, timedelta
 from django.contrib import auth
 from django.contrib.auth.models import AnonymousUser