From ee9a2789e91135f6d9a845fc9c35be6b3e7a4f1e Mon Sep 17 00:00:00 2001 From: wrongecho Date: Sat, 14 Sep 2024 19:14:35 +0100 Subject: [PATCH] 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 --- admin_roles.php | 4 ++-- functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin_roles.php b/admin_roles.php index 92913031..6a0e3f85 100644 --- a/admin_roles.php +++ b/admin_roles.php @@ -97,8 +97,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - - + + diff --git a/functions.php b/functions.php index 0711b222..e26aaf34 100644 --- a/functions.php +++ b/functions.php @@ -1354,7 +1354,7 @@ function lookupUserPermission($module) { $sql = mysqli_query( $mysqli, - "SELECT + "SELECT urp.user_role_permission_level FROM modules AS m