ACL access check now check the object for permission inheritance too. IE: page navigation links.
This commit is contained in:
@@ -59,6 +59,13 @@ class AccessControlListManager(models.Manager):
|
||||
if related:
|
||||
obj = getattr(obj, related)
|
||||
|
||||
try:
|
||||
parent_accessor = ModelPermission.get_inheritance(obj._meta.model)
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
obj = getattr(obj, parent_accessor)
|
||||
|
||||
user_roles = []
|
||||
for group in user.groups.all():
|
||||
for role in group.roles.all():
|
||||
|
||||
Reference in New Issue
Block a user