mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
cf91eff7cf
Includes db schema and dbauthz layer for upserting custom roles. Unit test in `customroles_test.go` verify against escalating permissions through this feature.
21 lines
482 B
SQL
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
|
|
);
|