allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [8/8] git commit: [#7372] implement disable_user, update other methods to mirror from Local provider impl
Date Tue, 27 May 2014 22:00:05 GMT
[#7372] implement disable_user, update other methods to mirror from Local provider impl


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/04fb907a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/04fb907a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/04fb907a

Branch: refs/heads/master
Commit: 04fb907a543112a1fae7e1da367d19946a8ad757
Parents: 3045810
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue May 27 21:51:38 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue May 27 21:51:49 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/plugin.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/04fb907a/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 2d3039c..f1e30e6 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -435,19 +435,20 @@ class LdapAuthenticationProvider(AuthenticationProvider):
         return False
 
     def user_project_shortname(self, user):
-        return 'u/' + user.username.replace('_', '-')
+        return LocalAuthenticationProvider(None).user_project_shortname(user)
 
     def user_by_project_shortname(self, shortname):
-        from allura import model as M
-        return M.User.query.get(username=shortname)
+        return LocalAuthenticationProvider(None).user_by_project_shortname(user)
 
     def user_registration_date(self, user):
-        if user._id:
-            return user._id.generation_time
-        return datetime.utcnow()
+        # could read this from an LDAP field?
+        return LocalAuthenticationProvider(None).user_registration_date(user)
 
     def update_notifications(self, user):
-        return ''
+        return LocalAuthenticationProvider(None).update_notifications(user)
+
+    def disable_user(self, user):
+        return LocalAuthenticationProvider(None).disable_user(user)
 
 
 class ProjectRegistrationProvider(object):


Mime
View raw message