Let team members update their own profile without admin routes, seed team.profile.update_mine RBAC, and add FAQ/personas/ratings admin integration guides. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
585 B
SQL
15 lines
585 B
SQL
INSERT INTO permissions (key, name, description, group_name) VALUES
|
|
('team.profile.update_mine', 'Update My Team Profile', 'Update own team profile', 'Team')
|
|
ON CONFLICT (key) DO UPDATE SET
|
|
name = EXCLUDED.name,
|
|
description = EXCLUDED.description,
|
|
group_name = EXCLUDED.group_name;
|
|
|
|
INSERT INTO role_permissions (role_id, permission_id)
|
|
SELECT r.id, p.id
|
|
FROM roles r
|
|
CROSS JOIN permissions p
|
|
WHERE r.name IN ('ADMIN', 'INSTRUCTOR', 'SUPPORT')
|
|
AND p.key IN ('team.profile.get_mine', 'team.profile.update_mine', 'team.members.change_password')
|
|
ON CONFLICT DO NOTHING;
|