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

Custom role not being added as an option when inviting a user #2464

Open
Sammieboy00 opened this issue Jun 4, 2024 · 3 comments
Open

Custom role not being added as an option when inviting a user #2464

Sammieboy00 opened this issue Jun 4, 2024 · 3 comments
Assignees

Comments

@Sammieboy00
Copy link

Sammieboy00 commented Jun 4, 2024

Description

I tried creating a test custom role in an instance and tried assigning a user to that custom role but the newly added custom role was not in the options.

Created Role:
image

Interface:
image

To Reproduce

1. Create a "Test Role" using Create Role API on an instance
2. Go to the instance's accounts UI
3. Click on Users
4. Click on Invite User
5. Input name, email, choose role.

Current vs. Expected behavior

Expected: Test Role can be chosen
Actual: Test Role is not part of the list. Only seeing default roles.

Which area(s) are affected? (Select all that apply)

Website

Additional context

No response

@markelmad
Copy link

The invite endpoint uses accessLevel (1-5) to identify what role they are invited with. That is why currently it is limited to the default (static) roles. Its database as well is limited to an int datatype. I'll be exploring extending accessLevel beyond 5 for custom role and check for any possible implications.

@markelmad
Copy link

This has been the behavior even with the old accounts-ui. Even though, in the old accounts-ui, you can select a custom role before sending the invite, it will still default to the base (system) role the custom role is created upon invite accept. For example:

  • Invited user as Test Admin Role (with accessLevel = 1 which is an Admin system role where the custom role is based)
  • User accepted invite. API will then check the accessLevel value which is 1. So the user will still have the static system role Admin instead of the custom role Test Admin Role.

@darwin808 darwin808 self-assigned this Jun 5, 2024
@darwin808
Copy link
Contributor

Blocked due to backend needing an update first, after which the frontend will proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants