mirror of
https://github.com/itflow-org/itflow
synced 2026-07-26 18:27:14 +00:00
Centralize client portal access checks through contactCan()
Replaces the duplicated primary/billing/technical checks across portal pages, post.php handlers, nav, and dashboard with contactCan()/enforceContactCan(). Same behavior, but the rules now live in one place instead of being copy-pasted, which is what let them drift before. file.php keeps its 404 response; ticket-visibility and approval-routing checks are intentionally left as-is.
This commit is contained in:
@@ -175,7 +175,7 @@ $sql_assigned_assets = mysqli_query(
|
||||
</div>
|
||||
<?php
|
||||
// Billing Cards
|
||||
if ($session_contact_primary == 1 || $session_contact_is_billing_contact) { ?>
|
||||
if (contactCan('accounting')) { ?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -211,7 +211,7 @@ if ($session_contact_primary == 1 || $session_contact_is_billing_contact) { ?>
|
||||
|
||||
<?php
|
||||
// Technical Cards
|
||||
if ($session_contact_primary == 1 || $session_contact_is_technical_contact) {
|
||||
if (contactCan('itdoc')) {
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user