proper productionize project
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
-- The bootstrap flow is the sole way to create a system administrator.
|
||||
-- This database constraint closes the last concurrent-request race even if
|
||||
-- two bootstrap enrollments reach their final transaction simultaneously.
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS users_single_system_admin
|
||||
ON users ((role))
|
||||
WHERE role = 'system_admin';
|
||||
|
||||
-- PostgreSQL grants EXECUTE on new functions to PUBLIC by default. These two
|
||||
-- SECURITY DEFINER helpers deliberately cross tenant discovery boundaries and
|
||||
-- must only be callable by their owner (the current runtime/migration role).
|
||||
REVOKE EXECUTE ON FUNCTION public.lookup_component_access_token(BYTEA) FROM PUBLIC;
|
||||
REVOKE EXECUTE ON FUNCTION public.list_active_live_sources() FROM PUBLIC;
|
||||
Reference in New Issue
Block a user