-
Notifications
You must be signed in to change notification settings - Fork 2
Acl
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Models\Acl defines access rules linking groups to module/action permissions.
checkPermission($super, $groupId, $module, $action = null): boolgetModuleName(): string
Lifecycle hooks:
-
afterCreate()logs ACL add inAudit -
beforeDelete()logs ACL removal inAudit
$allowed = \Pair\Models\Acl::checkPermission(
$currentUser->super,
$currentUser->groupId,
'orders',
'edit'
);
if (!$allowed) {
throw new \Exception('Access denied');
}-
usermodule and super users are allowed by default incheckPermission. - Rule evaluation is SQL-count based and supports module-wide rules (empty action).