Permissions overhaul - Define permissions in the database

2nd attempt at this one!
Similar to #1008 but separately defining the roles, modules and associated permissions in the database.
Also has admin being a defined role automatically having full access.

Parent issue: #530
This commit is contained in:
wrongecho 2024-09-14 19:14:35 +01:00
parent c7340ca0d4
commit ee9a2789e9
2 changed files with 3 additions and 3 deletions

View File

@ -97,8 +97,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</a>
<?php if (empty($role_archived_at) && $role_user_count == 0) { ?>
<!-- To be added-->
<!-- <div class="dropdown-divider"></div>-->
<!-- To be added -->
<div class="dropdown-divider"></div>
<!-- <a class="dropdown-item text-danger confirm-link" href="post.php?archive_role=--><?php //echo $role_id; ?><!--&csrf_token=--><?php //echo $_SESSION['csrf_token'] ?><!--">-->
<!-- <i class="fas fa-fw fa-archive mr-2"></i>Archive-->
<!-- </a>-->

View File

@ -1354,7 +1354,7 @@ function lookupUserPermission($module) {
$sql = mysqli_query(
$mysqli,
"SELECT
"SELECT
urp.user_role_permission_level
FROM
modules AS m