Created a New Operations Team Role. - #1774
Conversation
… ensures that the operation team is also a student staff member prior to being assigned to the operations team. Added flash messages for setting a user to an operations team member and removing them from the opperations team in userManagemetn.py. Added isCeltsOperationTeam to demo_data.py for all nessicary users.
…peration team members access to Shortcuts in create an event on userManagement. Gave Operation Team members access to Program Details page and access to view and edit all programs. Changed user profile CELTS Labor section to a specialized version in userProfile.HTML. Added isCeltsOperationTeam to areas where isProgramMangerFor was being used.
…ed access for Operation Team members to view and edit all programs, and edited userProfile.html to allow Operation Team members to view and edit background check information.
…serManagement.py. Changed user.py property name from isOperationTeam to isOnOperationTeam for clarity purposes. Implemented a checkbox with tooltips to toggle isCeltsOperationTeam property in userManagement.html and applied functionality through jQuery in userManagement.js.
|
Do you think that there is a way to make the checkbox more prominent in its role? |
fritzj2
left a comment
There was a problem hiding this comment.
Looks good, just remove the unnecessary comments from the checks, and it should be fine.
| user = request.form.get('username') | ||
| eventID = request.form.get('eventId') | ||
| if g.current_user.isAdmin: | ||
| if g.current_user.isAdmin: # Unsure if I should add isOnOperationsTeam to this check. |
There was a problem hiding this comment.
This comment shouldn't be left in the final version
| def addCeltsStudentStaff(user): | ||
| user = User.get_by_id(user) | ||
| user.isCeltsStudentStaff = True | ||
| user.isCeltsStudentStaff = True # May change to account for Operations Team rules. (Ex and user.isCeltsOperationsTeam == False) |
| createActivityLog(f'Removed {user.firstName} {user.lastName} from a CELTS student staff member'+ | ||
| (f', and as a manager of {programManagerRoles}.' if programManagerRoles else ".")) | ||
|
|
||
| def removeCeltsOperationsTeam(user): # May need more detail. |
…y and reverted some test data.
BrianRamsay
left a comment
There was a problem hiding this comment.
There are a number of places where we check for admin, or program manager, or now celts operation team to manage a program.
We have a number of helper methods on the User model right now - what if we added a User.canManageProgram(self, program) method that performed this check. Then all of the boolean expressions can just use that
| flash(username + " cannot be added as CELTS Operations Team", "danger") | ||
| else: | ||
| if user.isCeltsOperationsTeam: | ||
| flash(user.firstName + " " + user.lastName +" is already a CELTS Operations Team member", "danger") |
There was a problem hiding this comment.
If they want to make someone a team member and they are already a team member, it's not a bad thing. What they wanted to happen is done! They can get the same message as a successful operation.
|
|
||
| elif method == "removeCeltsOperationsTeam": | ||
| if not user.isCeltsOperationsTeam: | ||
| flash(user.firstName + " " + user.lastName +" is not a CELTS Operations Team member", "danger") |
There was a problem hiding this comment.
Same as the above comment
…and replace it with the existing isCeltsOperationsTeam. Removed unnessicary checks from userManagement.py for isCeltsOperationsTeam.
…horization is enabled for program managers, operations team members, and admins. All related code was changed to accomodate this change.
…am toggle in the User Management page on userManagement.html.
…Team/celts into operationsTeam_AC

Issue Description
Fixes issue #1761
Create a new role called "Operations Team". Convert "Student Staff" to "Program Manager".
The existing "Student Staff" are "Program Managers". No change, other than consistent naming conventions, are needed to this role. (This change is no longer being implemented.)
Operations Team has all of the same permissions as a Program Manager, plus:
Changes
Testing
Testing Enabling and Disabling Operation Team Authorization as Admin.
Testing User Authorization for Operation Team.
Testing Event Creation for All Programs.
Testing Program Detail Viewing and Editing for All Programs.
Testing Editing Other Student's Background Checks.