Files
coder/coderd/database/migrations/testdata/fixtures/000209_custom_roles.up.sql
T
Steven Masley cf91eff7cf chore: implement databased backend for custom roles (#13295)
Includes db schema and dbauthz layer for upserting custom roles. Unit test in `customroles_test.go` verify against escalating permissions through this feature.
2024-05-16 13:11:26 -05:00

21 lines
482 B
SQL

INSERT INTO
custom_roles (
name,
display_name,
site_permissions,
org_permissions,
user_permissions,
created_at,
updated_at
)
VALUES
(
'custom-role',
'Custom Role',
'[{"negate":false,"resource_type":"deployment_config","action":"update"},{"negate":false,"resource_type":"workspace","action":"read"}]',
'{}',
'[{"negate":false,"resource_type":"workspace","action":"read"}]',
date_trunc('hour', NOW()),
date_trunc('hour', NOW()) + '30 minute'::interval
);