Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Create decorator for permissions verification #11

Open
richardbm opened this issue Apr 2, 2019 · 1 comment
Open

Create decorator for permissions verification #11

richardbm opened this issue Apr 2, 2019 · 1 comment

Comments

@richardbm
Copy link
Contributor

richardbm commented Apr 2, 2019

This decorator must:

  • evaluate permissions through PermissionContext
  • evaluate permissions through permissions list
  • evaluate permissions with a decorator fallback according to the ranger flags
  • receive a user flag to evaluate which flag must be enabled

Create a setting constant DJANGO_RANGER_ENABLED to evaluate if ranger is enabled or not.

@richardbm
Copy link
Contributor Author

richardbm commented Apr 2, 2019

suggested decorator:

    @ranger_decorator(
        old_permission=is_admin,
        permission_context=StoreBranchContext,
        permissions_list=None
    )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant