Browse Source

renamed ACL provider

Rafał Pitoń 11 years ago
parent
commit
7b5faca020
2 changed files with 8 additions and 8 deletions
  1. 7 7
      misago/acl/permissions/destroyusers.py
  2. 1 1
      misago/apps/destroyuser.py

+ 7 - 7
misago/acl/permissions/destroyusers.py

@@ -48,17 +48,17 @@ class DestroyUserACL(BaseACL):
 
 
 def build(acl, roles):
-    acl.destroyusers = DestroyUserACL()
-    acl.destroyusers.acl['can_destroy_user_older_than'] = 0
-    acl.destroyusers.acl['can_destroy_user_with_more_posts_than'] = 0
+    acl.destroy_users = DestroyUserACL()
+    acl.destroy_users.acl['can_destroy_user_older_than'] = 0
+    acl.destroy_users.acl['can_destroy_user_with_more_posts_than'] = 0
 
     for role in roles:
         try:
             if (role['can_destroy_user_older_than']
-                    and role['can_destroy_user_older_than'] > acl.destroyusers.acl['can_destroy_user_older_than']):
-                acl.destroyusers.acl['can_destroy_user_older_than'] = role['can_destroy_user_older_than']
+                    and role['can_destroy_user_older_than'] > acl.destroy_users.acl['can_destroy_user_older_than']):
+                acl.destroy_users.acl['can_destroy_user_older_than'] = role['can_destroy_user_older_than']
             if (role['can_destroy_user_with_more_posts_than']
-                    and role['can_destroy_user_with_more_posts_than'] > acl.destroyusers.acl['can_destroy_user_with_more_posts_than']):
-                acl.destroyusers.acl['can_destroy_user_with_more_posts_than'] = role['can_destroy_user_with_more_posts_than']
+                    and role['can_destroy_user_with_more_posts_than'] > acl.destroy_users.acl['can_destroy_user_with_more_posts_than']):
+                acl.destroy_users.acl['can_destroy_user_with_more_posts_than'] = role['can_destroy_user_with_more_posts_than']
         except KeyError:
             pass

+ 1 - 1
misago/apps/destroyuser.py

@@ -18,7 +18,7 @@ def destroy_user(request, user, username):
         return error403(request, _("You can't destroy your own account."))
 
     try:
-        request.acl.destroyusers.allow_destroy_user(user)
+        request.acl.destroy_users.allow_destroy_user(user)
     except ACLError403 as e:
         return error403(request, unicode(e))