mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Add more usernames to the blacklist
This commit is contained in:
13
rest-api/db/migrations/20250323134405_username_blocklist.sql
Normal file
13
rest-api/db/migrations/20250323134405_username_blocklist.sql
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-- migrate:up
|
||||||
|
ALTER TABLE internal.user
|
||||||
|
DROP CONSTRAINT username_not_blocked;
|
||||||
|
|
||||||
|
ALTER TABLE internal.user
|
||||||
|
ADD CONSTRAINT username_not_blocked CHECK (LOWER(username) NOT IN ('admin', 'administrator', 'api', 'auth', 'blog', 'cdn', 'docs', 'help', 'login', 'logout', 'profile', 'preview', 'previews', 'register', 'settings', 'setup', 'signin', 'signup', 'support', 'test', 'www'));
|
||||||
|
|
||||||
|
-- migrate:down
|
||||||
|
ALTER TABLE internal.user
|
||||||
|
DROP CONSTRAINT username_not_blocked;
|
||||||
|
|
||||||
|
ALTER TABLE internal.user
|
||||||
|
ADD CONSTRAINT username_not_blocked CHECK (LOWER(username) NOT IN ('admin', 'administrator', 'api', 'auth', 'blog', 'cdn', 'docs', 'help', 'login', 'logout', 'profile', 'register', 'settings', 'setup', 'signin', 'signup', 'support', 'test', 'www'));
|
||||||
Reference in New Issue
Block a user