question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Retrieve a list of objects based on roles and permisstions of a user

See original GitHub issue

Hello 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:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
hsluoyzcommented, Jan 1, 2022
1reaction
hsluoyzcommented, Jan 2, 2022

@dipeshhkc getImplicitPermissionsForUser() only supports one team.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found