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

Introduce Deactivate/Reactivate role flow #2537

Open
wants to merge 53 commits into
base: main
Choose a base branch
from

Conversation

mknowlton89
Copy link
Collaborator

@mknowlton89 mknowlton89 commented May 16, 2024

Features and Changes

This PR introduces the concept of deactivating roles. This feature will only be available to Enterprise organizations. This is being introduced now that we have custom-roles. With custom roles, organizations might want to exclusively use the custom-roles they have defined. Or there may be a single role that doesn't work well within their organization.

Deactivating roles allows these orgs to hide them from the role selection UI so someone with manageTeam permissions is not able to add it to any new or existing users. If an org does need to, for some reason, undo it, they can reactivate the role.

When a role is deactivated, it doesn't change the in-app experience or permissions for any users who have that role applied to their user. It simply provides filtering on the front end.

Testing

  • Ensure that you can deactivate a reserved role and upon doing so, the role gets a "deactivated" badge on /team#roles
  • Ensure that you can deactivate a custom role and upon doing so, the role gets a "deactivated" badge on /team#roles
  • Ensure that you can NOT deactivate a role if it is the org's default role.
  • Ensure that you can reactivate a reserved role and upon doing so, the badge is removed
  • Ensure that you can reactivate a custom role and upon doing so, the badge is removed
  • Ensure that if you delete a custom role and it's deactivated at the time of deletion, we also remove the id from the deactivatedRoles array
  • Ensure that if you deactivate a role, it is no longer accessible via the role selector when updating a user's role or setting the org's default role
  • Ensure that if a user has a deactivated role, their experience doesn't change at all
  • Ensure an enterprise is only able to choose a default role from their activated roles

Edge Cases:

  • Ensure that if an org deactivates ALL reserved roles to use only their custom roles, the role selector handles that gracefully
  • Ensure that if an org downgrades away from enterprise, we don't respect their deactivated roles (e.g. they act as if they're not deactivated)

Screenshots

jdorn and others added 30 commits May 8, 2024 10:59
@mknowlton89 mknowlton89 self-assigned this May 16, 2024
@mknowlton89 mknowlton89 changed the title [WIP] Mk/deactive role flow Introduce Deactivate/Reactivate role flow May 17, 2024
@mknowlton89 mknowlton89 requested a review from jdorn May 17, 2024 20:16
@mknowlton89 mknowlton89 marked this pull request as ready for review May 17, 2024 20:16
Copy link

github-actions bot commented May 17, 2024

Your preview environment pr-2537-bttf has been deployed.

Preview environment endpoints are available at:

@mknowlton89 mknowlton89 requested a review from jdorn May 29, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants