From 2d60e8ee711b7f19bd9d8f5bac1e73492377fecf Mon Sep 17 00:00:00 2001 From: LeandroJatai Date: Mon, 6 May 2024 10:22:18 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20ajuste=20no=20conjunto=20inicial=20de=20?= =?UTF-8?q?permiss=C3=B5es=20na=20constru=C3=A7=C3=A3o=20de=20classe=20cru?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/crud/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sapl/crud/base.py b/sapl/crud/base.py index 5dbc713dc..7c2eb4c6c 100644 --- a/sapl/crud/base.py +++ b/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)