Retrieve a list of objects based on roles and permisstions of a user
See original GitHub issueHello developers. I am kind of using casbin in a project for the first time and got into a strange situation 😅. I appreciate the help from this community. Thanks 🙇
Let us suppose we have this policy
p editor team1 profile1 write
p editor team1 profile2 read
p admin team1 profile3 write
g user1 editor team1
g user1 admin team2
Problem: I want get the list of profiles(object) where user1 has (read/write) permission
I expect this result
profile1
profile2
It would be a great help if someone can give me ideas regarding solving this problem. And also let me know if I need to change the design of the policy to achieve this or if this is not what casbin is used for 🙏
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
List database object level permissions for all sql server logins ...
For all SQL server logins (AD and SQL) and database users. Based on either permissions coming from roles, or from direct granting to...
Read more >list of users and roles that have permissions to an object (table ...
It's a bit tricky. First, remember that the built-in roles have pre-defined access; these won't show up in the query below. The proposed...
Read more >Find objects linked to a PostgreSQL role
9). I want to drop this user. So I first revoke all permissions on tables, sequences, functions, default privileges and ownership too:
Read more >Query to find Object Level Access rights of a user
In this article, detailed information will be provided on how a single query can fetch the object level rights of any user.
Read more >Get the list of permissions of database object
It displays the users who can access to database object, who granded the permission, type of permission, owner of hte objects, etc. --...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dipeshhkc see: https://casbin.org/docs/en/rbac#how-to-query-implicit-roles-or-permissions
And thanks for writing so many Casbin articles!
@dipeshhkc
getImplicitPermissionsForUser()
only supports one team.