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', 'staff'], true)) {
|
||||
http_response_code(403);
|
||||
exit('Access denied.');
|
||||
}
|
||||
require '../include_header.php';
|
||||
?>
|
||||
|
||||
@@ -135,7 +139,7 @@
|
||||
|
||||
<!-- Submit -->
|
||||
<div class="mb-3 col-lg-12">
|
||||
<button type="submit" class="btn btn-primary" onclick="manage_stock_transfer();">Transfer Stock</button>
|
||||
<button type="submit" class="btn btn-primary" data-min-role="staff" onclick="manage_stock_transfer();">Transfer Stock</button>
|
||||
<button type="button" class="btn btn-success ms-2 d-none" id="approve_stock_btn" onclick="approve_current_stock();">Approve</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user