Browse Source

fix: ajuste no conjunto inicial de permissões na construção de classe crud

pull/3715/head
LeandroJatai 8 months ago
parent
commit
2d60e8ee71
  1. 6
      sapl/crud/base.py

6
sapl/crud/base.py

@ -972,7 +972,9 @@ class Crud:
if not cls.__abstract__:
return view
pr = set()
pr = set(view.permission_required) if hasattr(
view, 'permission_required') else set()
if hasattr(view, 'permission_required') and \
view.permission_required and \
hasattr(cls, 'public') and \
@ -981,7 +983,7 @@ class Crud:
#print(view.permission_required, view)
#print(cls.public, cls)
pr = set(view.permission_required) - set(cls.public)
pr = pr - set(cls.public)
class CrudViewWithBase(cls.BaseMixin, view):
permission_required = tuple(pr)

Loading…
Cancel
Save