Skip to content

Commit

Permalink
Permissions overhaul - Define permissions in the database
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wrongecho committed Sep 14, 2024
1 parent 271019b commit c7340ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions admin_roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
</div>
</div>
</div>
<div class="col-md-8">
<div class="float-right">
<!--<button type="button" class="btn btn-default" data-toggle="modal" data-target="#exportRoleModal"><i class="fa fa-fw fa-download mr-2"></i>Export</button>-->
</div>
</div>
</div>
</form>
<hr>
Expand Down
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1356,13 +1356,13 @@ function lookupUserPermission($module) {
$mysqli,
"SELECT
urp.user_role_permission_level
FROM
FROM
modules AS m
JOIN
JOIN
user_role_permissions AS urp
ON
ON
m.module_id = urp.module_id
WHERE
WHERE
m.module_name = '$module' AND urp.user_role_id = $session_user_role"
);

Expand Down

0 comments on commit c7340ca

Please sign in to comment.