roles guard + docs + logo
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
<?php
|
||||
session_start();
|
||||
require '../config.php';
|
||||
if (!in_array($_SESSION['login_role'] ?? 'viewer', ['owner', 'admin'], true)) {
|
||||
http_response_code(403);
|
||||
exit('Access denied.');
|
||||
}
|
||||
require '../include_header.php';
|
||||
|
||||
?>
|
||||
@@ -99,7 +103,7 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" class="btn btn-primary" onclick="manage_storage();">Add Storage</button>
|
||||
<button type="submit" class="btn btn-primary" data-min-role="admin" onclick="manage_storage();">Add Storage</button>
|
||||
<button type="reset" class="btn btn-secondary" onclick="reset_input('#storageForm')">Clear</button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user