zesty-io / website

Marketing Website using NextJS and Zesty.io Headless CMS
https://www.zesty.io
The Unlicense
17 stars 2 forks source link

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

Open Sammieboy00 opened 3 weeks ago

Sammieboy00 commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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:

darwin808 commented 1 week ago

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