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

VPS-166/managing scene permission backend #196

Merged
merged 12 commits into from
May 29, 2024

Conversation

codecreator127
Copy link
Contributor

Describe the issue

Current scene roles UI not hooked up to the backend

When playing a scene, doesn't check if the user role can play the current scene according to the defined roles.

Describe the solution

Backend

Refactored the scene model to include a list of roles (replacing the old tags attribute that was a string)

Frontend

Scene role saving

Linked the new scene role selection UI in SceneSettings component to the backend by making a new function saveRoles(newRoles) that uses the existing API endpoint /api/scenario/${scenarioId}/scene/roles (scenario level update, updates all scenes, but configured to only update the roles of the scene that is selected)

Inserted saveRoles(newRoles) function into role check box handlers, so saves scene roles check box on change

Play role check

Added a check on the PlayScenarioMulti page for the user role against the set scene roles
image

Risk

May risk PlayScenarioMulti not functioning properly if user role is undefined, as well if the scene roles are undefined

Definition of Done

  • Code peer-reviewed
  • Wiki Documentation is written and up to date
  • Unit tests written and passing
  • Integration tests written and passing
  • Continuous Integration build passing
  • Acceptance criteria met
  • Deployed to production environment

Reviewed By

Who reviewed your PR - for commit history once merged

specific scene. Also now shows the updated choice
on initailization
@codecreator127 codecreator127 requested a review from wjin-lee May 29, 2024 02:28
@wjin-lee wjin-lee merged commit 6fe2bf9 into master May 29, 2024
6 checks passed
@wjin-lee wjin-lee deleted the VPS-166/managing-scene-permission-backend branch May 29, 2024 08:10
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.

3 participants