permissions

Enforce multi-tenant role-based permissions in Wasp applications.

2|1|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ToonVos/empty-opensaas --skill permissions-toonvos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: permissions
Source: https://github.com/ToonVos/empty-opensaas/tree/main/.claude/skills/permissions
Command: npx skills add https://github.com/ToonVos/empty-opensaas --skill permissions-toonvos

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about permissions

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

FAQPage Schema
How do I implement role-based access control in a multi-tenant Wasp application?

Role-based access control in Wasp uses hierarchical roles—OWNER, ADMIN, MANAGER, MEMBER, VIEWER—defined at organization and department levels. This Skill provides helper functions like getUserOrgRole and getUserRoleInDepartment to check permissions server-side before executing operations, preventing unauthorized access across tenant boundaries.

What's the best way to prevent data leaks between organizations and departments in Wasp?

Enforce multi-tenant permission validation at the operation level using helper functions such as canAccessOrganization, canAccessDepartment, and canAccessDocument. This Skill guides integrating these checks into Wasp operations with proper HTTP status codes (401, 403, 404) to ensure data filtering and secure isolation.

How do I check if a user has permission to access a specific document in a multi-tenant setup?

Use the canAccessDocument helper function, which validates that the user holds MEMBER or MANAGER role in the document's department, or OWNER/ADMIN role in the organization. This Skill provides the framework to implement granular resource-level access checks within Wasp operations.

Can I use hierarchical department structures with role-based permissions in Wasp?

Yes. This Skill supports hierarchical department structures where organization-level admins inherit broader access, while department-level roles restrict access granularly. It provides functions to traverse and validate permissions across department hierarchies in multi-tenant Wasp applications.

Do I need separate logic for organization-level versus department-level access checks?

No. This Skill provides specialized helper functions—isOrgAdmin for organization-level checks and getUserRoleInDepartment for department-level validation—eliminating redundant authorization logic while maintaining clear separation of concerns in Wasp operations.