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

OAuth: filter by groups or map groups #5911

Open
lprobsth opened this issue Jan 22, 2024 · 0 comments
Open

OAuth: filter by groups or map groups #5911

lprobsth opened this issue Jan 22, 2024 · 0 comments
Labels

Comments

@lprobsth
Copy link

Currently the oauth SSO option allows all users from the oauth provider to login.

It would be nice to use the groups defined by the identity provider with OAUTH_ATTRIBUTE_MAP.

Use cases:

  • only allow users from certain groups to login
  • map groups from the oauth provider to the internal groups. Can this be implemented like the role mapping?
    if CUSTOM_GET_USER_ROLE:
    remote_role_value = oauth_user_info.get('role', '')
    if remote_role_value:
    role = custom_get_user_role(remote_role_value)
    # update user role
    ccnet_api.update_role_emailuser(email, role)
    # update user role quota
    role_quota = get_enabled_role_permissions_by_role(role)['role_quota']
    if role_quota:
    quota = get_quota_from_string(role_quota)
    seafile_api.set_role_quota(role, quota)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants