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

feat: Adding a new user in the demo team automatically assigns the demoUser role #3867

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Oct 29, 2024

What does this PR do?

  • If a user is added to the demo team, assigns the demoUser role instead of the teamEditor role

To test

  • Add a user to the "Demo" team
  • User appears in table with demoUser role applied
  • Hasura team_members table confirms this

Next steps...

  • Enforce via login API that users with the demoUser role can only access staging
  • Update team members UI to me more role agnostic - some language like "Team Editors" is not quite right (demoUser and teamViewer users are displayed)
  • Hide certain UI elements from demoUser role

@DafyddLlyr DafyddLlyr marked this pull request as draft October 29, 2024 09:19
Copy link

github-actions bot commented Oct 29, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr changed the title feat: Adding a new user in the demo team automatically asigns the demoUser role feat: Adding a new user in the demo team automatically assigns the demoUser role Oct 29, 2024
@DafyddLlyr DafyddLlyr marked this pull request as ready for review October 29, 2024 14:08
@DafyddLlyr DafyddLlyr requested a review from a team October 29, 2024 14:08
@DafyddLlyr DafyddLlyr marked this pull request as draft October 29, 2024 14:30
@DafyddLlyr DafyddLlyr marked this pull request as ready for review October 29, 2024 14:58
@@ -35,6 +35,7 @@ describe("when a user presses 'add a new editor'", () => {
teamMembers: mockTeamMembersData,
user: mockPlatformAdminUser,
teamSlug: "planx",
teamId: 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're setting teamId here now because we need it to differentiate between the demo team and non-demo teams?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@RODO94 RODO94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works for me as expected and the code looks clean and concise.

@DafyddLlyr DafyddLlyr merged commit e65e434 into main Oct 29, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/add-demo-user-ui branch October 29, 2024 15:34
@RODO94
Copy link
Contributor

RODO94 commented Oct 30, 2024

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.

2 participants