Add Asset Management app
Assets from purchase invoice lines, straight-line depreciation/amortization with salvage value, disposals, and [Asset Mgmt] sources in Batch GL Entries. Green third workspace with an app access guard.
This commit is contained in:
@@ -20,6 +20,17 @@ if (!function_exists('require_role')) {
|
||||
}
|
||||
}
|
||||
|
||||
// Blocks users whose app_access does not include $app ('all' includes every app).
|
||||
if (!function_exists('require_app_access')) {
|
||||
function require_app_access(string $app): void {
|
||||
$access = $_SESSION['login_app_access'] ?? 'wms';
|
||||
if ($access !== 'all' && $access !== $app) {
|
||||
http_response_code(403);
|
||||
exit(json_encode(['success' => 0, 'message' => 'You do not have access to this app.']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_SESSION["login_company_id"])){
|
||||
|
||||
// CSRF Validation — add right at the top of the logged-in block
|
||||
|
||||
Reference in New Issue
Block a user