epic-permissions

Enforce RBAC permission checks in Epic Stack routes, loaders, actions, and UI components.

5.5k|464|Updated May 4, 2023
One-click install
npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-permissions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: epic-permissions
Source: https://github.com/epicweb-dev/epic-stack/tree/main/docs/skills/epic-permissions
Command: npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-permissions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill codifies and enforces explicit RBAC and permission checks across server-side and client-side code in Epic Stack apps, eliminating ambiguous access decisions.

Core Features & Use Cases

  • Explicit permission strings and checks for actions like create:note:own or read:note:any.
  • RBAC model: Users, Roles, and Permissions with clear associations and a scalable seed mechanism.
  • Use Case: Secure a route by requiring a permission based on ownership and role, and gate UI elements based on user permissions.

Quick Start

Integrate the permission utilities into your app, seed initial roles and permissions, and update your routes and components to perform explicit checks during action/loader and on the client.

Frequently Asked Questions about epic-permissions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement RBAC permission checks in Epic Stack routes and loaders?

To implement RBAC in Epic Stack, you apply explicit permission strings like create:note:own or read:note:any within your routes, loaders, and actions to validate and enforce access control on the server before processing requests.

What is the best way to gate UI components based on user roles in an Epic Stack app?

The best way to gate UI components in an Epic Stack app is to apply explicit RBAC permission checks on the client side. You validate user permissions using structured permission strings to conditionally render or hide interface elements securely.

How do you structure permission strings for role-based access control?

Permission strings for role-based access control are structured as explicit action and scope combinations, such as create:note:own or read:note:any, standardizing security patterns by defining exact operations and ownership boundaries for user roles.

Can I use this RBAC model to seed initial roles and permissions in my application?

Yes, the RBAC model includes a scalable seed mechanism that establishes clear associations between users, roles, and permissions, allowing you to initialize and standardize security patterns across your entire project during setup.

Does Epic Stack RBAC support enforcing access control based on resource ownership?

Yes, Epic Stack RBAC supports enforcing access control based on ownership. You can require specific permissions using ownership scopes like create:note:own to ensure users can only manage resources they directly own within the route validation logic.

Related Skills