What problem does it solve?
Building access-control-list features in Discourse involves many moving parts—models, Guardian helpers, the write manager, site metadata, and frontend components—and mistakes like bypassing AccessControlListManager or skipping mandatory ACL injection create security gaps. This Skill provides the authoritative workflow and non-negotiable rules for implementing ACL-backed permissions correctly.
Core Features & Use Cases
- Backend ACL Modeling: Covers AccessControlList, AclTarget concern, Acl::Target/Acl::User lookup objects, Guardian helpers, mandatory/banned ACLs, and loss warning permissions.
- Write Path & Plugin Integration: Enforces routing all writes through AccessControlListManager, registering plugin target classes with DiscoursePluginRegistry, and exposing metadata via Site#access_control.
- Frontend Components: Documents DAccessControl and DAccessControlField usage, FormKit integration, permission option transforms, and loss-confirmation flows.
- Use Case: When adding a permission system to a Discourse plugin (e.g., a kanban board with view/edit/manage grants), use this Skill to wire the model, service, serializer, and UI correctly with full test coverage.
Quick Start
Use the discourse-acl-authoring skill to add ACL-backed view and manage permissions to my plugin's Board model with a FormKit editor.