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

refactor: expand canUserEdit function to include all user roles #3881

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Oct 30, 2024

Continuing work of the demo workspaces: https://trello.com/c/EfaEQRzK/2441-create-a-demo-workspace

I have expanded the use of the canUserEdit store function to return true as long as the role !== "teamViewer" as the database will populate the user.teams array with all teams the user is a team member of. The only role that can be assigned where you wouldn't be able to edit is the teamViewer role thus, I went with this for the condition.

In other circumstances, a user may be a teamEditor or demoUser and in both cases this will be assigned only on the teams they can edit

@RODO94
Copy link
Contributor Author

RODO94 commented Oct 30, 2024

@RODO94 RODO94 requested a review from a team October 30, 2024 16:29
Copy link

github-actions bot commented Oct 30, 2024

Removed vultr server and associated DNS entries

@RODO94 RODO94 merged commit 736e0fd into main Oct 30, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/demo-team-filter branch October 30, 2024 17:32
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