What problem does it solve?
This Skill provides a robust framework for implementing multi-tenant permission checking and role-based access control in Wasp applications. It eliminates the complexity of securing data across organizations and departments, preventing data leaks and unauthorized access.
Core Features & Use Cases
- Multi-Tenant Architecture: Defines a clear structure for organizations, hierarchical departments, and user roles (OWNER, ADMIN, MANAGER, MEMBER, VIEWER).
- Core Permission Helpers: Offers reusable functions to check organization-level, department-level, and resource-level access, simplifying authorization logic.
- Secure Operations Integration: Guides on integrating permission checks into Wasp operations, ensuring server-side enforcement and proper HTTP status code usage (401, 403, 404).
- Use Case: Implement a permission check for the
getDocument operation. This Skill will guide you to ensure only users with MEMBER or MANAGER role in the document's department can access it, and that organization OWNERs or ADMINs have full access.
Quick Start
Implement a permission check for the getDocument operation. Ensure only users with MEMBER or MANAGER role in the document's department can access it.