revert: "fix: remove fallback permssions on organization Id. (#22769)" (#23013)

* 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:
sean-brydon authored and GitHub committed 2025-08-26 08:32:49 -03:00
1 parent 2922c8fe77
commit ae738fae35
9 files changed
+22 -434

No files matched your search

@@ -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