allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: [#7892] skip already disabled users
Date Tue, 09 Jun 2015 15:20:27 GMT
Repository: allura
Updated Branches:
  refs/heads/db/7892 9d1cc15fb -> 103a72a54


[#7892] skip already disabled users


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

Branch: refs/heads/db/7892
Commit: 103a72a54646ffde5dbbeb6933b3c2abd164ec37
Parents: 9d1cc15
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Jun 9 11:19:44 2015 -0400
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Tue Jun 9 11:19:44 2015 -0400

----------------------------------------------------------------------
 Allura/allura/scripts/disable_users.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/103a72a5/Allura/allura/scripts/disable_users.py
----------------------------------------------------------------------
diff --git a/Allura/allura/scripts/disable_users.py b/Allura/allura/scripts/disable_users.py
index 9ce1a1b..7eeef33 100644
--- a/Allura/allura/scripts/disable_users.py
+++ b/Allura/allura/scripts/disable_users.py
@@ -49,6 +49,9 @@ class DisableUsers(ScriptTask):
             user = M.User.query.get(username=username)
             if not user:
                 log.info('Could not find user: %s', username)
+            elif user.disabled:
+                log.info('User is already disabled: %s', username)
+                session(user).expunge(user)
             else:
                 log.info('Disabling user: %s', username)
                 auth_provider.disable_user(user)


Mime
View raw message