Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(authz): Make permissions entity and scope aware #6391

Open
ThisIsMani opened this issue Oct 22, 2024 · 0 comments · May be fixed by #6394
Open

feat(authz): Make permissions entity and scope aware #6391

ThisIsMani opened this issue Oct 22, 2024 · 0 comments · May be fixed by #6394
Assignees

Comments

@ThisIsMani
Copy link
Contributor

Currently the permissions we use doesn't have any entity level context. But some of our APIs need that context.
For example,

  1. payment/list - This can only be accessible by merchant level users or higher. Profile level users should not be able to access it.
  2. payment/profile/list - This can be accessible by all level of users.

With current setup, this is not directly possible by the permissions. We had to introduce min_entity_level to solve this, but this is very separated from the permissions.

To solve this, we need to have entity level context at permissions level itself.

Scope for permissions

The write permissions currently doesn't have access to read APIs, but since write is a superset of read, they should be able to access read APIs as well.

So, this PR also introduces scope context in permissions.

@ThisIsMani ThisIsMani self-assigned this Oct 22, 2024
@ThisIsMani ThisIsMani linked a pull request Oct 22, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant