artisanpack-ui/rbac
ArtisanPack UI RBAC brings role-based access control to Laravel apps with a ready-made UI for managing roles, permissions, and user assignments. Define access rules and administer authorization from your admin panel, simplifying RBAC setup and day-to-day permission management.
ap.rbac.abilitiesForUser, ap.rbac.role.assigned, ap.rbac.role.revoked, ap.rbac.checkingAbility) means most custom RBAC requirements can be met by extending rather than forking or writing an in-house permission layer. This tilts the build-vs-buy call decisively toward buy/adopt for teams whose differentiators are not authorization.abilitiesForUser filter lets external packages graft permissions from LDAP groups, feature-flag services, or tenant-scoped policies. This unlocks roadmap items like SSO/SCIM provisioning, per-tenant role customization, and staged feature rollout by entitlement — without subclassing User or patching the package.ap.rbac.checkingAbility fires before every ability resolution, giving a low-friction audit seam for SOC 2 / HIPAA / ISO-style logging requirements. This can be scoped as a thin internal package rather than a platform-level refactor, materially reducing the estimate for "authorization audit trail" work.role.assigned and role.revoked actions support downstream automation — access reviews, welcome/offboarding flows, Slack notifications, cache invalidation, and analytics on privilege distribution. These are cheap wins to slot into a roadmap.hasPermissionTo() now resolves through getAbilities(), grafted permissions are honored uniformly by $user->can(), Gate::allows(), and @can. This is a product-quality point: extension authors cannot accidentally create a "works in Blade but not in policies" divergence, which reduces a common class of security bugs and support tickets.Consider adoption when:
@can surface rather than a parallel authorization DSL.Look elsewhere or proceed with caution when:
artisanpack-ui/hooks dependency. v1.1.0 makes it a hard dependency — the package no longer works without it, and hook fire sites are called unconditionally. Teams with strict third-party dependency review, air-gapped builds, or a policy of minimal transitive dependency trees should evaluate this explicitly before upgrading.is_admin flag) — the abstraction cost exceeds the benefit.For executives: This package gives us a production-grade authorization layer instead of one we build and maintain ourselves. The new release turns it into an integration point: permissions can be pulled from our identity provider, tenant configuration, or feature-flag system without forking the library, and every permission check can be logged for audit. That converts several roadmap items — SSO-driven entitlements, per-tenant roles, authorization audit trails, and access-review automation — from platform projects into small, low-risk integrations. The trade-off is one added third-party dependency, which we should clear through standard review.
For engineering: v1.1.0 exposes four lifecycle hooks via artisanpack-ui/hooks. ap.rbac.abilitiesForUser is a filter over the resolved ability list, so grafted permissions flow through hasPermissionTo(), getAbilities(), Gate::allows(), and @can consistently — no parallel code paths. ap.rbac.role.assigned and ap.rbac.role.revoked fire from HasRoles after attach/detach with (User, Role), suitable for cache invalidation and downstream events. ap.rbac.checkingAbility fires from the Gate::before shim with (User, ability, arguments) for audit logging. Note the breaking operational change: artisanpack-ui/hooks ^1.3 is now a hard dependency and hook sites are unconditional — there is no no-op fallback, so the dependency must be present in every environment, including CI and air-gapped builds. Upgrading is otherwise additive; existing role/permission behavior is unchanged.
Recommendation: Adopt and pin to v1.1.0, run the dependency change through security/licensing review, benchmark the added filter dispatch in hot authorization paths, and schedule the audit-logging and IdP-graft integrations as near-term roadmap items.
How can I help you explore Laravel packages today?