Weave Code
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

Acl Bundle Laravel Package

alchemy/acl-bundle

Symfony bundle providing a simple ACL API. Configure object types, alias your UserRepository, and add Redis cache for access tokens. Exposes endpoints to list, upsert, and delete ACEs by user/group, object type/id, with permission masks and wildcards.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Granular Permission Management for SaaS Platforms: Enables fine-grained access control (e.g., user/group-level permissions on Publication/Asset entities) without over-engineering a custom solution. The metadata feature (1.1.0+) allows attaching contextual data (e.g., expires_at, reason) to permissions, supporting use cases like:
    • Time-bound access (e.g., "Vendor can edit listing until Dec 31, 2024").
    • Audit trails (e.g., "Permission granted by Admin X for compliance review").
    • Dynamic workflows (e.g., "Editor can publish only if status: draft").
  • API-First Permission Management: The /permissions/aces endpoint provides a headless API for permission CRUD, ideal for:
    • Admin dashboards (React/Vue frontend consuming the API).
    • Third-party integrations (e.g., Slack bots granting access).
    • Serverless functions (e.g., AWS Lambda adjusting permissions post-event).
  • Build vs. Buy Decision: Justifies adopting this bundle over custom development for Symfony/Laravel apps needing:
    • Doctrine/Eloquent integration (no ORM-specific code required).
    • Redis-backed caching (reduces DB load for permission checks).
    • Symfony 7/PHP 8.5 compatibility (future-proofing).
  • Roadmap Priorities:
    • Phase 1: Integrate ACLs for high-value entities (e.g., Publication, Asset) to replace ad-hoc if ($user->isAdmin()) checks.
    • Phase 2: Leverage metadata for audit/compliance (e.g., log who, when, why for every permission change).
    • Phase 3: Build a minimal admin UI (e.g., DataTables + /permissions/aces API) to visualize and manage permissions.
  • Use Cases:
    • Content Platforms: Restrict editorial access to drafts/assets with metadata-driven rules (e.g., metadata: {status: "review"}).
    • Marketplaces: Grant vendors temporary access to listings (e.g., metadata: {expires_at: "2024-12-31"}).
    • Regulated Industries: Enforce attribute-based constraints (e.g., metadata: {department: "finance"} for financial data).
    • Multi-Tenant SaaS: Isolate tenant permissions with group-based ACLs (e.g., userType: group, userId: tenant-123).

When to Consider This Package

  • Adopt If:
    • Your Symfony/Laravel app uses Doctrine/Eloquent and needs object-level permissions (e.g., "User X can edit Publication Y").
    • You require API-driven ACL management (e.g., for admin tools or third-party integrations) and now metadata extensibility for audit/compliance.
    • Your team lacks bandwidth to build a custom ACL system, especially with Symfony 7.4+/PHP 8.5 support.
    • You need lightweight but powerful permissions with Redis caching and no GUI overhead (build a simple UI on top).
  • Look Elsewhere If:
    • You need attribute-based access control (ABAC) with complex policies (e.g., department AND clearance_level). While metadata helps, this bundle is not a full ABAC solution—consider:
      • Laravel Gates/Policies (simpler, role-based).
      • Casbin (for advanced policy languages like REGO).
    • Your stack isn’t Symfony 7.4+/PHP 8.5 or lacks Redis for token caching.
    • You require GUI tools for ACL visualization (this bundle is API-first; pair with a custom admin panel).
    • Your use case is simplistic (e.g., basic role-based access suffices; use Laravel’s built-in Gate/Policy system).

How to Pitch It (Stakeholders)

For Executives: *"This bundle gives us Swiss Army knife permissions—granular access control plus the ability to attach custom metadata (like audit logs or approval statuses) to every rule. For example:

  • A journalist can’t edit a publication unless it’s marked status: 'published' in the metadata.
  • Vendors get time-limited access to their listings (e.g., expires_at: '2024-12-31').
  • We can auto-generate compliance reports from the metadata without extra work. It’s fully compatible with Symfony 7 and PHP 8.5, so we’re future-proof. The cost? Almost zero—just a few config lines. The payoff? Fewer security gaps, happier admins with self-service tools, and audit trails that just work."*

For Engineering: *"The 1.1.0 release adds two critical features:

  1. Metadata Support: Attach arbitrary key-value pairs to permissions (e.g., PUT /permissions/ace with metadata={"reason": "editorial_override"}). This enables:
    • Audit logging (track who granted access and why).
    • Contextual rules (e.g., metadata.expires_at for temporary permissions).
    • Compliance tracking (e.g., metadata.department for role segregation).
  2. Symfony 7 + PHP 8.5: No breaking changes, but now we can use modern Symfony features like typed properties or attributes in our ACL logic. Tradeoffs:
  • Still no built-in GUI (you’ll need to scaffold a simple React/Vue admin panel using the /permissions/aces endpoint).
  • Metadata is stored in the DB (not cached), so heavy usage may need Redis optimization. Recommendation: Use this for any project needing object-level permissions + audit trails. For ABAC or complex policies, pair it with Laravel’s Gate/Policy system or evaluate Casbin."*

For Product Managers: *"This solves three key pain points:

  1. Security: Replace fragile if ($user->isAdmin()) checks with a centralized, auditable permission system.
  2. Compliance: Metadata lets us log why permissions were granted (e.g., reason: "client_request"), which is critical for GDPR/SOC2.
  3. Scalability: The API-first design means we can add permission management to any tool (admin panel, CLI, third-party app) without custom code. Next Steps:
  • Start with metadata for audit trails (low risk, high value).
  • Build a minimal admin UI to visualize permissions (Phase 2).
  • Explore group-based ACLs for multi-tenant isolation (Phase 3)."*
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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony