Skip to content

Commit

Permalink
πŸ‚ Added possibility to implement checkers by RBAC or ABAC standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
zurek11 committed Nov 24, 2020
1 parent 26e91d4 commit d6fbba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion object_checker/base_object_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def get_checkers(cls):
)
)
else:
cls.loaded_checkers.update({f'{attr_name}': (getattr(subclass, attr_name), checking_subclass)})
cls.loaded_checkers.update(
{f'{attr_name}': (getattr(subclass, attr_name), checking_subclass)}
)

return cls.loaded_checkers

Expand Down
2 changes: 1 addition & 1 deletion tests/checkers/abstract_objects_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def check_abac(cls, user: User, obj):
try:
user_group = user.groups.get(name='manager')
group_name = user_group.name
except:
except Group.DoesNotExist:
group_name = ''

if group_name == 'manager':
Expand Down

0 comments on commit d6fbba4

Please sign in to comment.