Skip to content

Commit

Permalink
Merge pull request #462 from BCStudentSoftwareDevTeam/1321-fix_visibi…
Browse files Browse the repository at this point in the history
…lity_students_admin

Add permission for admin students for New Labor Status Form
  • Loading branch information
bledsoef authored Nov 18, 2024
2 parents 1d9d44d + 65d363e commit e48bf15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/main_routes/laborStatusForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
def laborStatusForm(laborStatusKey = None):
""" Render labor Status Form, and pre-populate LaborStatusForm page with the correct information when redirected from Labor History."""
currentUser = require_login()

if not currentUser: # Not logged in
return render_template('errors/403.html'), 403
if not currentUser.isLaborAdmin:
Expand Down
6 changes: 5 additions & 1 deletion app/templates/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ <h4>Supervisor Portal</h4>
</div>
</a>
</div>
{% endif %}
{% if currentUser.supervisor or (currentUser.student and currentUser.isLaborAdmin) %}
<div class="panel panel-default">
<a class="adminTest" href="/laborstatusform">
<div {% if request.path =="/laborstatusform" %} class="panel-heading active"{% endif %} class="panel-heading" tabindex="5">
<div {% if request.path == "/laborstatusform" %} class="panel-heading active"{% endif %} class="panel-heading" tabindex="5">
<h4>New Labor Status Form</h4>
</div>
</a>
</div>
{% endif %}
{% if currentUser.supervisor %}
<div class="panel panel-default">
<a class="adminTest" href="/main/search">
<div {% if request.path =="/main/search" %} class="panel-heading active"{% endif %} class="panel-heading" tabindex="7">
Expand Down

0 comments on commit e48bf15

Please sign in to comment.