Skip to content

Conversation

@qasema
Copy link
Contributor

@qasema qasema commented Sep 1, 2023

Did: fixes #984 and added a new role called student Admin. Student admin should have the same privileges as program managers for all programs aside from Bonner.

Test:

  • Switch to branch studentAdmin
  • Reset the data to ensure the role in the database (test data).
  • In the bottom left corner switch the current user to Student Admin: bledsoef
  • Go through events, create, delete, and edit events. Make sure the user has access and can edit for events associated with all programs except for Bonner
  • Switch to user to Admin and go to settings and then user management. Try to add and remove a new student Admin to make sure it works as expected.
  • review code

Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-evaluate all of the boolean expressions you have added this to. So far all of them are wrong.

@gahimbaref
Copy link
Contributor

The Student Admin doesn't have access to the edit page

image

@gahimbaref
Copy link
Contributor

When an admin creates a bonner event, a student admin has access to it when you switch roles
image

Copy link
Contributor

@AndersonStettner AndersonStettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to create tests for new logic.

@gahimbaref gahimbaref self-requested a review December 4, 2023 21:33
<div class="col-md-6 mb-3">
<div>
{{createInputsButtons("searchCeltsAdminInput", "Add Celts Admin")}}<br>
{% if g.current_user.isCeltsAdmin and not g.current_user.isCeltsStudentAdmin %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everyone with isCeltsAdmin true will have isCeltsStudentAdmin false, right? So Anderson was right after all, that the second part is redundant.

@gahimbaref
Copy link
Contributor

image
double-check if search loads up students properly when adding a new student admin, it doesn't always load student names

@bledsoef bledsoef assigned bledsoef and azabeli and unassigned qasema and ojmakinde Mar 1, 2024
@azabeli azabeli removed their request for review March 1, 2024 17:39
def getAllowedTemplates(currentUser):
"""Returns a list of all visible templates depending on who the current user is. If they are not an admin it should always be none."""
if currentUser.isCeltsAdmin:
if currentUser.isCeltsAdmin or currentUser.isCeltsStudentAdmin:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this allow them to see Bonner events?

@github-actions
Copy link

View Code Coverage

@bledsoef bledsoef added the on hold This issue is waiting on another issue or more information or analysis label Mar 12, 2024
@bledsoef
Copy link
Contributor

Placing on hold because we need to reevaluate what permissions student admins should be able to have.

@bledsoef
Copy link
Contributor

#1181 creating spreadsheet here

@bledsoef
Copy link
Contributor

Spreadsheet has been created, still waiting to hear back from @BrianRamsay on whether not the permissions are correct so we can finalize this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold This issue is waiting on another issue or more information or analysis

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new Student Admin role

10 participants