Repository navigation
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).
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4