|
@ -234,15 +234,14 @@ class CrudBaseMixin(CrispyLayoutFormMixin): |
|
|
if hasattr(obj, 'public'): |
|
|
if hasattr(obj, 'public'): |
|
|
self.permission_required = list( |
|
|
self.permission_required = list( |
|
|
set(self.permission_required) - set(obj.public)) |
|
|
set(self.permission_required) - set(obj.public)) |
|
|
|
|
|
else: |
|
|
self.permission_required = tuple(( |
|
|
|
|
|
self.permission(pr) for pr in self.permission_required)) |
|
|
|
|
|
|
|
|
|
|
|
if not hasattr(obj, 'públic'): |
|
|
|
|
|
obj.public = list( |
|
|
obj.public = list( |
|
|
set(self.permission_required) - |
|
|
set(self.permission_required) - |
|
|
set((RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE))) |
|
|
set((RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE))) |
|
|
|
|
|
|
|
|
|
|
|
self.permission_required = tuple(( |
|
|
|
|
|
self.permission(pr) for pr in self.permission_required)) |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
obj.public = [] |
|
|
obj.public = [] |
|
|
|
|
|
|
|
|