mirror of https://github.com/itflow-org/itflow
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:
parent
271019b16b
commit
c7340ca0d4
|
|
@ -45,11 +45,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue