Attendee Group Permissions
Group permissions control audience access and contribute API object, field and ability scopes for installed portal content. Configure them alongside the installed version's dependencies and the project's selected resources. A rendered page, a hidden menu item and an authorized data request are separate results.
This guide describes current shared contracts. Endpoint-specific enforcement and installed acceptance must still be tested. The original design is retained as history; its proposed absolute field ceiling and universal endpoint examples are not current guarantees.
Configuration owners
| Configuration | Owner and purpose |
|---|---|
| Version dependencies | Developer declares models, permission slots, abilities, identifiers and optional visible-field defaults. |
Installation dependency_list | Project configuration selects concrete resources using the declared binding keys and model keys. |
| Audience rules and scopes | Authorized project configuration chooses public/group allow/deny rules and per-slot overrides. |
| Endpoint/query handling | Server code authorizes the operation and applies the appropriate record/field restrictions. |
Follow Permissions and Dependencies for supported declarations and editor controls. Do not copy design-era ability names into a manifest; use the permission names and model keys supported by the intended API.
Rule inheritance
HasGroupPermissions::effectiveRules() uses a content object's own persisted rules when any exist, including a deny-only rule set. Otherwise it reads its permission parent's rules. A portal page attachment uses its linked project page/form as that parent; its own rule set replaces, rather than merges with, the parent set. Removing the last attachment rule can therefore expose the inherited defaults again.
Check both the installation and the specific portal attachment when one route behaves differently from another. Group membership is a separate relationship; creating or naming a group does not assign attendees to it.
Audience decision
The evaluator matches a public rule for guests or attendees, or a group rule when its group IDs intersect the attendee's memberships. Guests have no attendee group IDs. The gate then decides:
| Effective rules | Result |
|---|---|
| No rules | Allow, preserving legacy behavior. |
| Any matching deny | Deny, regardless of matching allows or sort order. |
| Allow rules exist | Require at least one matching allow. |
| Only deny rules exist and none match | Allow. |
Adding a group can grant more matching allows, but can also match a deny and remove access. The old design's blanket statement that adding groups can never reduce access is therefore unsafe as a description of the whole gate.
sort_order is not authorization precedence. Matching allow rules' navigation configuration is shallow-merged in ascending order, with later keys replacing earlier keys. Navigation metadata does not grant a server operation.
Page authentication and API context
The browser page controller resolves an active attachment, checks authentication, then evaluates its audience. A restricted/missing/inactive page can return 404; guests on authentication-required browser routes can be sent to login first.
For page-key API authorization, PortalPageAccess rejects inactive or audience-denied pages with 404 and rejects login-required pages without a same-project attendee or active reader principal with 401. A reader participates in the group gate as a guest. Middleware and the base dashboard policy share this check. Bare attendee credentials, a widget token or a copied page key do not independently establish access to every project resource.
Use the runtime's supported principal/page-context handling. Verify the actual endpoint, action, project, binding and returned fields; this shared architecture does not assert identical hooks on every API route. See Project Troubleshooting for browser versus JSON diagnosis.
Permission slots and object scope
A dependency's permissionKey, when supplied, addresses its permission slot; otherwise the resolver falls back to its identifier. The installation selector can use a different key. A child @permissionKey declaration resolves through the selected parent dependency; it is not a literal project-object ID to save in a selector.
Bindings can use the declared model key, not always a numeric ID. Where tag selectors are supported, object IDs, #tag and @untagged are distinct choices. Storage normalization resolves valid project-local tag slugs to IDs and rejects unknown/malformed references. Multiple choices are any-match; empty matcher scope selects nothing.
The evaluator compiles object branches per matching allow rule. Explicit * identifiers are project-wide. Named scopes ordinarily retain their page binding and any additional rule tags, but effective :viewAny abilities can select a project-wide branch. Parent-scoped dependencies retain the relationship scope resolved through the selected parent instead of receiving that widening—for example, attendees reached through the bound group remain constrained by that group. Inspect the actual declaration and compiled request behavior before treating a named binding as a universal object boundary.
A scope row whose dependency_identifier equals the slot key takes precedence over the rule-wide default row whose dependency_identifier is null; absent overrides inherit. Contributions from matching allow rules combine with OR. A narrow rule does not subtract an object's access granted by another matching rule.
Field and ability merges
Current PermissionEvaluationService::compilePlan() has these semantics:
| Dimension | Current behavior |
|---|---|
Developer visibleFields missing/empty | Unrestricted (null), not zero visible fields. |
Rule visible_fields missing/empty | Inherit the developer default. |
| Explicit nonempty rule fields | Replace the developer field set; project overrides may narrow or widen it. |
| Multiple matching allow contributions | Union their fields; any unrestricted contribution leaves fields unrestricted. |
| Dropped abilities | Remove from that rule's contribution; matching allow contributions union their remaining abilities. |
Consequently, a drop only persists when no other matching contribution grants that ability. An explicit narrow field list cannot revoke fields inherited through another unrestricted matching rule. The implementation uses names such as “ceiling” internally, but the current field override is not an immutable maximum.
These are compilation rules, not proof that every serializer, include or nested route applies them correctly. Test excluded records and sensitive fields through actual response bodies. Collection/form-specific access and registration flows have their own handlers; use their module guides rather than a generic parent/child design example as an endpoint guarantee.
Configure and verify
- Record the installed version and its actual dependency declarations.
- Select project-local resources with the correct selector/model keys.
- Inspect page/form defaults and any replacing portal-attachment rules.
- Configure public/group allows and denies deliberately; review overlapping groups.
- Inspect per-slot fields, dropped abilities and object filters across all matching allows.
- Test a guest, intended attendee, excluded attendee, overlapping-group attendee and another-project principal.
- Exercise direct routes and the app's APIs, including list/show/nested responses and denied mutations. Confirm excluded records/fields are absent.
- Change a rule or membership and recheck the result in the target deployment; do not assume a rendered navigation update establishes all data-path behavior.
Retain expected and observed outcomes, installed IDs, identity category, exact request and sanitized response evidence. Do not broaden to wildcard/public access merely to conceal a wrong binding. Use Project resources and Project acceptance for configuration inventory and release checks.
Implementation reference
Platform sources: app/Traits/HasGroupPermissions.php, app/Services/Permissions/PermissionEvaluationService.php, DependencyScopeResolver.php, DependencyMatcher.php, PortalPageAccess.php, app/Http/Middleware/EnforcePermissionContext.php and app/Policies/BaseDashboardPolicy.php. Native evaluator/resolver tests and deployment acceptance provide different scopes of evidence; retain their outcomes separately.