mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
60517bc2a6
Initialize new bots with preset ACL templates and an allow-by-default fallback so common access setups can be selected during bot creation instead of being configured manually afterward.
15 lines
347 B
SQL
15 lines
347 B
SQL
-- 0066_acl_default_allow
|
|
-- Restore the bot ACL default effect to deny for newly created bots.
|
|
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (
|
|
SELECT 1
|
|
FROM information_schema.columns
|
|
WHERE table_name = 'bots' AND column_name = 'acl_default_effect'
|
|
) THEN
|
|
ALTER TABLE bots
|
|
ALTER COLUMN acl_default_effect SET DEFAULT 'deny';
|
|
END IF;
|
|
END $$;
|