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

limit apps that a user can login by group #2881

Closed
link89 opened this issue Apr 19, 2024 · 6 comments
Closed

limit apps that a user can login by group #2881

link89 opened this issue Apr 19, 2024 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@link89
Copy link
Contributor

link89 commented Apr 19, 2024

As a system admin, I have an organization with mutliple apps under it.

I hope that for some apps only specific user can login. I know that it can be done by tags, but this solution has two problems:

  1. tags are hard to manage, its hard to find how many user have specific tag.
  2. a user can have only one tag a time (I may be wrong as it is not clean in the document)

By using group both issue can be solved, as group has a managment page and a user can belong to multiple group.

@casbin-bot
Copy link
Contributor

@casbin-bot casbin-bot added the enhancement New feature or request label Apr 19, 2024
@hsluoyz
Copy link
Member

hsluoyz commented Apr 19, 2024

@hsluoyz hsluoyz closed this as completed Apr 19, 2024
@hsluoyz hsluoyz added question Further information is requested and removed enhancement New feature or request labels Apr 19, 2024
@link89
Copy link
Contributor Author

link89 commented Apr 19, 2024

@hsluoyz The example you show it is to deny specify users to read specific apps. Is it possible to use white list rule?
For example, if there are 3 apps in an organization, how to setup rules so that

  • all users can access App1
  • only users in group whitelist-app2 can access App2
  • only users in group whitelist-app3 can access App3

@hsluoyz
Copy link
Member

hsluoyz commented Apr 19, 2024

@link89 you deny all first, then allow someone

@jump2cn
Copy link
Contributor

jump2cn commented Apr 28, 2024

@link89 you deny all first, then allow someone

hi @hsluoyz
I have created two permissions for users, one is to deny all, the other one allow a role. and the user have matched by permission in the user info page, but it still deny when user login.
图片
图片

[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[role_definition]
g = _, _

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act

@hsluoyz
Copy link
Member

hsluoyz commented Apr 28, 2024

Closed issues won't be responded.

@casdoor casdoor locked as resolved and limited conversation to collaborators Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants