mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28982 -- Simplified code with and/or.
This commit is contained in:
committed by
Tim Graham
parent
c2d0f8c084
commit
d7b2aa24f7
@@ -339,9 +339,7 @@ class SimpleRowlevelBackend:
|
||||
return False
|
||||
|
||||
def has_module_perms(self, user, app_label):
|
||||
if not user.is_anonymous and not user.is_active:
|
||||
return False
|
||||
return app_label == "app1"
|
||||
return (user.is_anonymous or user.is_active) and app_label == 'app1'
|
||||
|
||||
def get_all_permissions(self, user, obj=None):
|
||||
if not obj:
|
||||
|
||||
Reference in New Issue
Block a user