greenlight
greenlight copied to clipboard
GIT-3028: Added the room creation capability for admins (Closes #3028).
Description
As requested in #3028 any user having a role with the can_manage_rooms_and_recordings
and the manage_users
permissions now have the ability to create a room for any other active
user with a role that has the permission can_create_room
right from the Manage Users
area in their organizational panel.
Testing Steps
- Created several accounts with a role with the permission
can_create_room
. - Accessed the
Manage Users
area of the organizational panel with an admin account with the required permissions (can_manage_rooms_and_recordings
andmanage_users
). - Created rooms for selected users in the
àctive
users table. - Confirmed the success of the operation by the
success
flash, on the accounts respective room space and on the database.
Also:
- Confirmed the intact of the room area features (Creating,Updating,Deleting ... rooms).
- Confirmed the alerting when creating rooms with invalid parameters (empty name) and on accounts with limit reached.
- Confirmed the incapacity to have this feature once the admin or the target account lacks one of the required permissions.
Things that may be good to add:
We can give the ability to create rooms on all accounts only requiring the creator to have both of the can_manage_rooms_and_recordings
and the manage_users
without:
- Checking that the target users are meant to have rooms by
can_create_rooms
. - Making sure that they're active.
- Checking the room limits.
-> I decided to make this as restrict as possible to go along with the expected behavior (IMHO) in the target user room space and without making any break change to Greenlight (GL) codebase.
Because a user without the can_create_rooms
permission won't have a room space to use (and therefore to use the created room) and bypassing the room limitation will create a room that cannot be used (because it exceeds the limit) with the current design of GL.
I also thought that adding the Auto join on creation
to the admin will require some changes and creates some overhead to keep things intact while providing a functionality that it seems that it best fit in the owner room space (A teacher can create a room and want to start and join it immediately but an administrator will likely use this feature to create several rooms for a bunch users rarely with the purpose to join it).
Screenshots (if appropriate):
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication