feat: Add global administrator role support with integration tests for admin-only club endpoints.

This commit is contained in:
WorkClub Automation
2026-03-18 15:11:42 +01:00
parent d295c9123e
commit 04641319ce
6 changed files with 77 additions and 2 deletions
@@ -67,6 +67,8 @@ public class CustomWebApplicationFactory<TProgram> : WebApplicationFactory<TProg
GRANT CONNECT ON DATABASE workclub_test TO rls_test_user;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO rls_test_user;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO rls_test_user;
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'app_admin') THEN
CREATE ROLE app_admin;
END IF;
END $$;
";