* Revert "fix: remove fallback permssions on organization Id. (#22769)"
This reverts commit 30061c0d58.
Removes the manage permission concept and fallback logic to simplify
permission checking back to direct role-based checks.
* remove manage from workflows
* fix type error and remove manage from components
This commit is contained in:
1 parent
2922c8fe77
commit
ae738fae35
9 files changed
+22
-434
No files matched your search
-24
@@ -1,24 +0,0 @@
|
||||
-- Add manage permissions to admin and owner roles
|
||||
-- These permissions are for organization-level management capabilities
|
||||
|
||||
-- Insert manage permissions for admin role
|
||||
INSERT INTO "RolePermission" (id, "roleId", resource, action, "createdAt")
|
||||
SELECT
|
||||
gen_random_uuid(), 'admin_role', resource, action, NOW()
|
||||
FROM (
|
||||
VALUES
|
||||
-- Role management permissions (organization scope)
|
||||
('role', 'manage'),
|
||||
|
||||
-- Event Type management permissions (organization scope)
|
||||
('eventType', 'manage'),
|
||||
|
||||
-- Team management permissions (organization scope)
|
||||
('team', 'manage'),
|
||||
|
||||
-- Booking management permissions (organization scope)
|
||||
('booking', 'manage')
|
||||
) AS permissions(resource, action)
|
||||
ON CONFLICT ("roleId", resource, action) DO NOTHING;
|
||||
|
||||
-- Note: Owner role already has wildcard permissions (*.*) so it inherits all manage permissions automatically
|
||||
Reference in new issue
Block a user