You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent some users from self-assigning certain roles
In order to
Retain some level of control for certain role privileges
Acceptance Criteria
Admins must be able to block users via slash command /role-control add
When adding users to the blocked list, the admins must be able to specify the following
User/s to be added to the list (Multiple input), see notes for rules
Role/s to be blocked from being self-assigned (Multiple input)
Duration of block in months (integer) (optional)
When a User self-assigns a role, check whether the user exists in the blocked list, and check if the role being assigned exists, if both are true, remove the assigned role from the user. Then send a private message to the user informing him/her that he/she is disallowed from self-assigning the role/s (See notes)
If a user has already assigned a role prior to being added to the list, automatically remove the role from that user once the rule has been saved
Include when the user/s were blocked from self-assigning the role when saving the rule
Post a system log entry for each user added to the list
Admins must be able to see a list of all block entries via slash command /role-control list
Each entry must display the following
id
Username
Role(s) blocked from being self-assigned
Date Created
Duration
Admins must be able to delete an entry via slash command /role-control remove <id> where is the entry id of the record
Every 1st day of the month, if a user in the block list exceeds his/her block duration or earned dev-help points during the previous month, remove that user from the block list, and reassign the role (See Notes)
Notes
Multiple input for Users
Save each user as individual entries
Use UUID for IDs instead of a integers
Private Message Template
Hello <User>, you are temporarily disallowed from self-assigning the role <selected role>. If you believe this is a mistake, please contact an administrator
If Current Date >= Block Date Created + Duration (month) then remove the block entry and reassign the role
If there is an update to the points of the user during the previous month, remove the block entry and reassign the role
As a
Admin
I want to
Prevent some users from self-assigning certain roles
In order to
Retain some level of control for certain role privileges
Acceptance Criteria
/role-control add/role-control list/role-control remove <id>where is the entry id of the recordNotes
Hello <User>, you are temporarily disallowed from self-assigning the role <selected role>. If you believe this is a mistake, please contact an administrator