mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
fix: align user group access controls
This commit is contained in:
@@ -49,3 +49,52 @@ CREATE INDEX IF NOT EXISTS user_group_members_user_id_idx
|
||||
|
||||
CREATE INDEX IF NOT EXISTS user_groups_priority_name_idx
|
||||
ON user_groups (priority DESC, name ASC, id ASC);
|
||||
|
||||
INSERT OR IGNORE INTO user_groups (
|
||||
id,
|
||||
name,
|
||||
normalized_name,
|
||||
description,
|
||||
priority,
|
||||
allowed_providers_mode,
|
||||
allowed_api_formats_mode,
|
||||
allowed_models_mode,
|
||||
rate_limit_mode,
|
||||
created_at,
|
||||
updated_at
|
||||
)
|
||||
VALUES (
|
||||
'00000000-0000-0000-0000-000000000001',
|
||||
'Default',
|
||||
'default',
|
||||
'Default unrestricted group for all users',
|
||||
0,
|
||||
'unrestricted',
|
||||
'unrestricted',
|
||||
'unrestricted',
|
||||
'system',
|
||||
CAST(strftime('%s', 'now') AS INTEGER),
|
||||
CAST(strftime('%s', 'now') AS INTEGER)
|
||||
);
|
||||
|
||||
INSERT OR IGNORE INTO system_configs (
|
||||
id,
|
||||
key,
|
||||
value,
|
||||
description,
|
||||
created_at,
|
||||
updated_at
|
||||
)
|
||||
VALUES (
|
||||
'00000000-0000-0000-0000-000000000002',
|
||||
'default_user_group_id',
|
||||
'"00000000-0000-0000-0000-000000000001"',
|
||||
'Default unrestricted user group',
|
||||
CAST(strftime('%s', 'now') AS INTEGER),
|
||||
CAST(strftime('%s', 'now') AS INTEGER)
|
||||
);
|
||||
|
||||
INSERT OR IGNORE INTO user_group_members (group_id, user_id, created_at)
|
||||
SELECT '00000000-0000-0000-0000-000000000001', id, CAST(strftime('%s', 'now') AS INTEGER)
|
||||
FROM users
|
||||
WHERE is_deleted = 0;
|
||||
|
||||
Reference in New Issue
Block a user