mirror of https://github.com/buster-so/buster.git
Update team role handling in migration script to include 'admin' as 'manager' and default to 'member'
- Modified the role adjustment logic in the teams_to_users table to treat 'admin' roles as 'manager'. - Set the default role to 'member' for all other cases, improving clarity in role assignments. These changes enhance the migration process for dataset groups and permissions management.
This commit is contained in:
parent
1182235116
commit
fd54b4724d
|
@ -106,7 +106,8 @@ CREATE TYPE team_role_enum AS ENUM ('manager', 'member');
|
|||
ALTER TABLE teams_to_users ALTER COLUMN role TYPE team_role_enum USING
|
||||
CASE
|
||||
WHEN role::text = 'owner' THEN 'manager'::team_role_enum
|
||||
ELSE role::text::team_role_enum
|
||||
WHEN role::text = 'admin' THEN 'manager'::team_role_enum
|
||||
ELSE 'member'::team_role_enum
|
||||
END;
|
||||
|
||||
-- Set new default
|
||||
|
|
Loading…
Reference in New Issue