authorization
Installation
SKILL.md
Authorization
Applicability (check first)
This skill describes the current sprintify baseline; projects forked from an older sprintify may lack the frontend pieces. Check opportunistically:
- If the project ships its own
.ai/skills/authorization/, defer to that copy. - The backend patterns (policies, nested controllers,
canDo()) apply to every sprintify-derived project —Support\Controller\ControllerandSupport\Resource\BaseResourceare part of the base. - The frontend
<Gate>patterns needresources/js/components/Gate.vue/GateRouterLink.vue. If they don't exist (older forks), gate visibility with the row-levelresource.can.*flags thatcanDo()already exposes (v-if="comment.can.resolve") — and don't port the components uninvited.
When to Activate
- Activate when creating or modifying policies, controllers with authorization, or
<Gate>/<GateRouterLink>usage. - Activate when a permission bug arises (user can do X but can't see Y).
- Activate when adding a new nested resource endpoint under a parent resource.
- Activate when code references
authorize(),authorizeResource(),canDo(),Gate::allows(), or the permissions store.