Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Permission Manager Laravel Package

hosseinhezami/laravel-permission-manager

Enterprise-grade Laravel permission manager combining RBAC, ABAC, role hierarchy, multi-tenancy, wildcard and temporary permissions, condition engine, multi-guard support, audit logging, middleware DSL, Blade directives, and Gate/Policy integration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

Build vs. buy for authorization infrastructure. Authorization is a "must-have, never a differentiator" capability. This package bundles several features that teams typically build in-house over multiple sprints — explicit allow/deny precedence, role hierarchy with cycle detection, wildcard matching, time-boxed permissions, team-scoped roles, JSON condition rules, and audit logging — into a single dependency. The decision it informs is whether to spend engineering weeks on bespoke authorization or adopt a pre-built engine and spend that capacity on customer-facing features.

Feature feasibility on the roadmap. Capabilities that are expensive to add later map directly to roadmap commitments:

  • Enterprise/SSO-tier deals — audit logging (permission_audits, authorization_logs) and role hierarchy are frequently explicit security questionnaire requirements. This package makes them a configuration task rather than a quarter-long project.
  • SaaS / multi-tenant expansion — per-team role assignment (assignRoleForTeam) is the difference between "we can serve multi-tenant customers" and "we need an architecture rewrite." If multi-tenancy is on the 2–4 quarter horizon, this is a strong accelerator.
  • Granular delegation & self-service admin — direct permissions, temporary permissions with expiry, and permission groups/sets support product features like "invite a contractor for 30 days" or "let a customer admin scope their own team."
  • Contextual rules — the ABAC/condition engine (canPermission('posts.update', $post) with ownership/status conditions) enables product rules like "editors can only edit their own drafts" without hardcoding policy logic per model.

Support and incident-response decisions. The explain() API, permission:why, and permission:doctor commands materially reduce the cost of "why can't this user see this?" support tickets — a recurring, hard-to-estimate operational tax in any RBAC system. This is a quality-of-life lever, not a headline feature, but it influences on-call load.

Buy-in sizing for security/compliance reviews. The explicit, documented resolution order (super-admin → user deny → role deny → user allow → role allow → inherited → default deny) is the artifact security reviewers ask for. Having a written precedence model shortens audit cycles.

What it does not decide. It is not a reason to re-architect an existing, working authorization layer. It does not replace Laravel's Gate/Policy system — it integrates with it, so the migration cost is additive, not substitutive.

When to Consider This Package

Good fit:

  • You are starting a new Laravel 10–13 application where authorization is greenfield and the data model is not yet frozen.
  • Your product is (or is becoming) multi-tenant/multi-team SaaS, where per-tenant roles are a core requirement rather than an afterthought.
  • You have enterprise or regulated buyers for whom audit trails, explicit deny semantics, and time-bound access are procurement requirements.
  • You need ABAC-style contextual rules (ownership, status, attribute conditions) and would otherwise write and maintain a condition evaluator yourself.
  • You have team capacity to own the integration: writing tests around the trait, validating migration behavior, and pinning a version.

Look elsewhere or proceed with caution:

  • Ecosystem maturity is the dominant risk. 62 GitHub stars and 0 dependents means essentially zero third-party production validation. Spatie's laravel-permission has orders of magnitude more installs, Stack Overflow coverage, and community answers. For a foundational, security-adjacent layer, that asymmetry matters more than the feature list.
  • Bus factor. A single-maintainer package with no dependents is an unhedged dependency. If your organization requires a supported vendor or a documented succession plan for critical dependencies, this fails that bar.
  • Schema footprint. 14 tables is a substantial commitment. It touches User models, tenancy, and reporting queries. Rolling it back after 12 months of production data is a real project, not a composer remove.
  • Overlapping incumbent. If you already run Spatie successfully and don't need hierarchy/multi-tenancy/ABAC, you gain little and inherit migration risk. Adopt only if a specific missing capability is blocking a committed roadmap item.
  • Simple needs. A single-tenant app with 5 roles and 20 permissions should use Gate/Policy directly. This package is over-engineered for that case.
  • You need battle-tested upgrade paths. Evaluate release cadence and whether the maintainer responds to security issues on a timeline your SLAs require before committing.

Gate to adoption: Run a two-day spike — install, model your three most complex real authorization rules, and verify them against the test suite. Treat a successful spike plus a written exit/migration plan as the go/no-go criteria.

How to Pitch It (Stakeholders)

To executives and product leadership:

Authorization is table-stakes infrastructure that currently costs us engineering weeks and generates recurring support load. This package provides enterprise-grade capability — role hierarchies, per-tenant roles, time-limited access, contextual rules, and a full audit trail — as a single MIT-licensed dependency. It directly unblocks two things we've discussed: enterprise/regulated deals that require audit trails, and multi-tenant SaaS expansion. The trade-off is real: it's a young library with limited public adoption and a single maintainer, so we'd adopt it behind an internal test suite, pin the version, and keep a documented exit path. Recommendation: timeboxed spike now; adopt if it clears our own test matrix.

To engineering:

Feature-for-feature, this is what we'd build in 4–6 sprints: RBAC plus explicit deny precedence, role inheritance with cycle detection, wildcard matching, temporary permissions, team-scoped roles, a JSON condition engine (no eval), and audit logging. It integrates with native Gate/Policy via Gate::before() rather than replacing them, so we're not fighting the framework. It ships 141 tests / 226 assertions, a documented resolution order, and genuinely useful operator tooling — permission:doctor, permission:why, and an explain() API that turns permission-debugging from log archaeology into a one-liner. Costs: 14 new tables, a PermissionTrait on the User model, and a dependency we must own. Ask: spike it against our three hairiest authorization rules and report back on migration friction, query overhead under caching, and upgrade risk.

To security and compliance:

The package exposes an explicit, documented authorization precedence model, writes an immutable audit record for permission changes, and optionally logs access attempts. Roles are scoped per team/guard, and permission grants can be time-boxed with automatic expiry — which supports least-privilege and temporary-elevation policies. Caveat for your review: it is a young, single-maintainer project with no known production dependents, so we will require internal test coverage on the authorization paths and a pinned version with a monitored advisory feed before it goes near production.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings