File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 66
77require_once "check_login.php " ;
88
9- validateAdminRole ();
10-
11- // TODO: Change this to enforceAdminPermission();
12- // We can't do this until everyone has the new database fields added in db 1.4.9 on Sept 14th 2024
9+ if (!isset ($ session_is_admin ) || !$ session_is_admin ) {
10+ exit (WORDING_ROLECHECK_FAILED . "<br>Tell your admin: Your role does not have admin access. " );
11+ }
1312
1413require_once "header.php " ;
1514
Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ class="d-none d-md-inline dropdown-toggle"><?php echo stripslashes(nullable_html
161161 </li>
162162 <!-- Menu Footer-->
163163 <li class="user-footer">
164- <?php if ($ session_user_role == 3 ) { ?>
165- <a href="admin_user.php" class="btn btn-default btn-block btn-flat mb-2"><i class="fas fa-user-shield mr-2"></i>Administration</a>
164+ <?php if ($ session_is_admin ) { ?>
165+ <a href="admin_user.php" class="btn btn-default btn-block btn-flat mb-2"><i class="fas fa-user-shield mr-2"></i>Administration</a>
166166 <?php } ?>
167167 <a href="user_details.php" class="btn btn-default btn-flat"><i class="fas fa-user-cog mr-2"></i>Account</a>
168168 <a href="post.php?logout" class="btn btn-default btn-flat float-right"><i class="fas fa-sign-out-alt mr-2"></i>Logout</a>
You can’t perform that action at this time.
0 commit comments