-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Support for Scalelite Tagged Servers #5790
Conversation
ac857ee
to
beedc4b
Compare
1ab2201
to
29c0c49
Compare
Quality Gate passedIssues Measures |
…pdown in room settings
…n GL: serverTag and serverTagRequired
…ide it entirely when the string is empty
…ropdown selection + tweaks&fixes
… config in sample.env
There are some architecture changes that I would make here to match the way the rest of the application works:
Once this change is made, I think it would simplify the logic quite a bit |
Thanks four your review and I agree with your suggestions. I knew my iteratively developed solution would need a refactoring, but I wanted to have your opinion first to avoid doing it twice. However, I think I won't get it done today as it's basically weekend already here. ;-) |
@farhatahmad That said, do you think the implementation can stay as is in terms of UI/functionality and DB migrations? Because then I would soon be able to deploy the feature for our users independent of the upstream review/merge/release status. |
…d in meeting_starter.rb (which matches what the user would see in terms of UI, namely the default tag name)
@farhatahmad I'm done with refactoring. It required me to understand more of the architecture, but as a result I think the code has greatly improved in quality. No env variables are passed to React anymore. Also, now invalid/forbidden tags will silently be dropped by meeting_starter (i.e. falling back to untagged), which matches what a user would see in that case (default label, i.e. untagged). This makes the solution more robust in case an admin forgot to use the sync task after changes and also against malicious users. |
…tions of tags / list of allowed tags
Definitely a lot cleaner and in line with the way Greenlight is designed. I'll do a full indepth review tomorrow |
app/javascript/components/rooms/room/room_settings/RoomSettings.jsx
Outdated
Show resolved
Hide resolved
…n ServerTagsController
…s in the expected state (i.e. no tags related options present)
Quality Gate passedIssues Measures |
This PR adds frontend support for "Tagged Servers" in Scalelite, a feature which is described here: blindsidenetworks/scalelite#1049
Description
This PR allows user to configure two new options for each room:
In terms of UI, it presents itself as seen in the following screenshots:
The list of available options is defined by the Greenlight administrator and certain tags can be restricted to certain role ids. In the current iteration of this feature, this is done via .env config file and is documented in
sample.env
:The required database migration is included and well tested. No RSpec tests have been added, but the feature is tested in deployment for multiple rooms, configuration combinations etc.
Notes
Currently, if a room has been configured with a tag and then later the tag is removed from the site-wide configuration or permission is revoked for the user's role, the room's configured tag will remain in the database and will still be used for create calls. However, the configuration field will show as empty in the UI and only allow changes to valid/allowed tags.Solved by commit 29c0c49 and further improved by 2928003Currently, the role-based restriction of tags is only done by sending a list of allowed tags to the JavaScript code and not again validated on the backend side. This seems OK as long as the impact of potential malicious users abusing known "VIP" tags is tolerable.Solved by commits 2928003 & ffcd972, invalid/forbidden tags will be dropped by the meeting_starter and they show as default type / untagged in the UI.What is "missing" / Future Development
Add a sync task for the administrator to remove invalid tags from rooms after configuration file changeDone (29c0c49)Validate role-based tag restriction on backend side (I could use a hint on how and at which point this should be done ideally, would also be happy if someone else could contribute this)Done (2928003 / ffcd972)