Skip to content

Commit 0832625

Browse files
committed
Add some simple descriptions for authorizations and roles
1 parent c849e4b commit 0832625

File tree

1 file changed

+105
-29
lines changed

1 file changed

+105
-29
lines changed

internal/database/migrations/0029_service_accounts.sql

+105-29
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,90 @@ CREATE TABLE authorizations (name TEXT PRIMARY KEY, description TEXT NOT NULL)
4747
INSERT INTO
4848
authorizations (name, description)
4949
VALUES
50-
('activity_logs:read', 'Some description'),
51-
('service_accounts:create', 'Some description'),
52-
('service_accounts:delete', 'Some description'),
53-
('service_accounts:read', 'Some description'),
54-
('service_accounts:update', 'Some description'),
55-
('teams:create', 'Some description'),
56-
('teams:delete', 'Some description'),
57-
('teams:metadata:update', 'Some description'),
58-
('teams:members:admin', 'Some description'),
59-
('teams:secrets:create', 'Some description'),
60-
('teams:secrets:delete', 'Some description'),
61-
('teams:secrets:update', 'Some description'),
62-
('teams:secrets:read', 'Some description'),
63-
('teams:secrets:list', 'Some description'),
64-
('repositories:create', 'Some description'),
65-
('repositories:delete', 'Some description'),
66-
('applications:update', 'Some description'),
67-
('applications:delete', 'Some description'),
68-
('jobs:update', 'Some description'),
69-
('jobs:delete', 'Some description'),
70-
('deploy_key:read', 'Some description'),
71-
('deploy_key:update', 'Some description'),
72-
('unleash:create', 'Some description'),
73-
('unleash:update', 'Some description')
50+
(
51+
'activity_logs:read',
52+
'Permission to read activity logs.'
53+
),
54+
(
55+
'service_accounts:create',
56+
'Permission to create service accounts.'
57+
),
58+
(
59+
'service_accounts:delete',
60+
'Permission to delete service accounts.'
61+
),
62+
(
63+
'service_accounts:read',
64+
'Permission to read service accounts.'
65+
),
66+
(
67+
'service_accounts:update',
68+
'Permission to update service accounts.'
69+
),
70+
('teams:create', 'Permission to create teams.'),
71+
('teams:delete', 'Permission to delete teams.'),
72+
(
73+
'teams:metadata:update',
74+
'Permission to update team metadata.'
75+
),
76+
(
77+
'teams:members:admin',
78+
'Permission to administer team members.'
79+
),
80+
(
81+
'teams:secrets:create',
82+
'Permission to create team secrets.'
83+
),
84+
(
85+
'teams:secrets:delete',
86+
'Permission to delete team secrets.'
87+
),
88+
(
89+
'teams:secrets:update',
90+
'Permission to update team secrets.'
91+
),
92+
(
93+
'teams:secrets:read',
94+
'Permission to read team secrets.'
95+
),
96+
(
97+
'teams:secrets:list',
98+
'Permission to list team secrets.'
99+
),
100+
(
101+
'repositories:create',
102+
'Permission to create team repositories.'
103+
),
104+
(
105+
'repositories:delete',
106+
'Permission to delete team repositories.'
107+
),
108+
(
109+
'applications:update',
110+
'Permission to update applications.'
111+
),
112+
(
113+
'applications:delete',
114+
'Permission to delete applications.'
115+
),
116+
('jobs:update', 'Permission to update jobs.'),
117+
('jobs:delete', 'Permission to delete jobs.'),
118+
(
119+
'deploy_key:read',
120+
'Permission to read deploy keys.'
121+
),
122+
(
123+
'deploy_key:update',
124+
'Permission to update deploy keys.'
125+
),
126+
(
127+
'unleash:create',
128+
'Permission to create unleash instances.'
129+
),
130+
(
131+
'unleash:update',
132+
'Permission to update unleash instances.'
133+
)
74134
;
75135

76136
CREATE TABLE role_authorizations (
@@ -93,15 +153,31 @@ CREATE TABLE service_accounts (
93153
INSERT INTO
94154
roles (name, description, is_only_global)
95155
VALUES
96-
('Deploy key viewer', 'Some description', FALSE),
156+
(
157+
'Deploy key viewer',
158+
'Permits the actor to view deploy keys.',
159+
FALSE
160+
),
97161
(
98162
'Service account owner',
99-
'Some description',
163+
'Permits the actor to manage service accounts.',
164+
FALSE
165+
),
166+
(
167+
'Team creator',
168+
'Permits the actor to create teams.',
169+
TRUE
170+
),
171+
(
172+
'Team member',
173+
'Permits the actor to do actions on behalf of a team. Also includes managing most team resources except members.',
100174
FALSE
101175
),
102-
('Team creator', 'Some description', TRUE),
103-
('Team member', 'Some description', FALSE),
104-
('Team owner', 'Some description', FALSE)
176+
(
177+
'Team owner',
178+
'Permits the actor to do actions on behalf of a team. Also includes managing all team resources, including members.',
179+
FALSE
180+
)
105181
;
106182

107183
INSERT INTO

0 commit comments

Comments
 (0)