mirror of https://github.com/itflow-org/itflow
Implement new admin check
Uses the new $session_is_admin rather than the old validateAdminRole. Reverts #1065
This commit is contained in:
parent
77b3eca687
commit
fe94036b3a
|
|
@ -6,10 +6,9 @@ require_once "functions.php";
|
|||
|
||||
require_once "check_login.php";
|
||||
|
||||
validateAdminRole();
|
||||
|
||||
// TODO: Change this to enforceAdminPermission();
|
||||
// We can't do this until everyone has the new database fields added in db 1.4.9 on Sept 14th 2024
|
||||
if (!isset($session_is_admin) || !$session_is_admin) {
|
||||
exit(WORDING_ROLECHECK_FAILED . "<br>Tell your admin: Your role does not have admin access.");
|
||||
}
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@
|
|||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<?php if ($session_user_role == 3) { ?>
|
||||
<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>
|
||||
<?php if ($session_is_admin) { ?>
|
||||
<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>
|
||||
<?php } ?>
|
||||
<a href="user_details.php" class="btn btn-default btn-flat"><i class="fas fa-user-cog mr-2"></i>Account</a>
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue