-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model to a list to allow for multiple roles per scene
…ithub.com/UoaWDCC/VPS into VPS-166/managing-scene-permission-backend
UI to scene roles backend. Now saves chosen roles
…ithub.com/UoaWDCC/VPS into VPS-166/managing-scene-permission-backend
prettier convention
wjin-lee
requested changes
May 29, 2024
frontend/src/containers/pages/AuthoringTool/CanvasSideBar/SceneSettings.jsx
Outdated
Show resolved
Hide resolved
specific scene. Also now shows the updated choice on initailization
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 functionsaveRoles(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 changePlay role check
Added a check on the
PlayScenarioMulti
page for the user role against the set scene rolesRisk
May risk PlayScenarioMulti not functioning properly if user role is undefined, as well if the scene roles are undefined
Definition of Done
Reviewed By
Who reviewed your PR - for commit history once merged