We allow owners and developers of Tramline to add new users. Now, we would also like Owner and Developers to be able to edit the role of other users so that existing viewers can have their role escalated as necessary. This is especially useful in SSO scenarios where any user of the org can self-join as a viewer.
Requirements
The role upgrade should follow the following rubric:
Users cannot change their own roles
Owners can change the roles of developers and viewers
Developers can change the roles of only viewers
Viewers cannot change any roles
Owner rules
Owners can upgrade a developer to an owner
Owners can downgrade a developer to a viewer
Developer rules
Developers can upgrade a viewer to a developer
Developers cannot upgrade/downgrade owners
Developers cannot upgrade/downgrade an owner or another developer
Acceptance Criteria
Functionality includes:
Interface to edit roles for any user.
Appropriate success/fail flash messaging to the user
Model validations
Unit tests
Additional Notes
The table UI can follow the same interface as the "Team" section above it for the edit modal.
Context
We have 3 roles in Tramline currently:
Owner (write access + billing link)
Developer (write access)
Viewer (read access to some things)
See this.
Under organization settings,
In the team tab,
We allow owners and developers of Tramline to add new users. Now, we would also like Owner and Developers to be able to edit the role of other users so that existing viewers can have their role escalated as necessary. This is especially useful in SSO scenarios where any user of the org can self-join as a viewer.
Requirements
The role upgrade should follow the following rubric:
Owner rules
Developer rules
Acceptance Criteria
Functionality includes:
Additional Notes
The table UI can follow the same interface as the "Team" section above it for the edit modal.