Skip to content

Commit 5a8d469

Browse files
author
serverpod_cloud
committed
fix: 22f0a4bbfefa0289be40a855045487b2b147bb5a
1 parent e3e0f78 commit 5a8d469

6 files changed

Lines changed: 25 additions & 26 deletions

File tree

ground_control_client/lib/src/protocol/features/project/models/role.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract class Role implements _i1.SerializableModel {
8484
/// A role belongs to a project. Cannot be changed.
8585
_i2.Project? project;
8686

87-
/// The name of the role, e.g. 'Owners'. Can be changed.
87+
/// The name of the role, e.g. 'Admin'. Can be changed.
8888
String name;
8989

9090
/// The access scopes this role has in the project.

serverpod_cloud_cli/lib/command_runner/commands/project_command.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ void _emailValidator(final value) {
203203
}
204204
}
205205

206-
const _projectRoleNames = ['owners'];
207-
const _projectRoleHelp = {'owners': 'Owners have full access to the project.'};
206+
const _projectRoleNames = ['admin'];
207+
const _projectRoleHelp = {'admin': 'Admins have full access to the project.'};
208208

209209
enum ProjectInviteUserOption<V> implements OptionDefinition<V> {
210210
projectId(

serverpod_cloud_cli/lib/commands/admin/project_admin.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ abstract class ProjectAdminCommands {
2121
'Project Id',
2222
'Created at ($timezoneName)',
2323
'Archived at ($timezoneName)',
24-
'Owners',
24+
'Admin',
2525
],
2626
rows: projects.map((final p) => [
2727
p.cloudProjectId,
2828
p.createdAt.toTzString(inUtc, 19),
2929
p.archivedAt?.toTzString(inUtc, 19),
30-
_formatProjectOwners(p),
30+
_formatProjectAdmins(p),
3131
]),
3232
);
3333
table.writeLines(logger.line);
3434
}
3535

36-
static String _formatProjectOwners(final Project project) {
36+
static String _formatProjectAdmins(final Project project) {
3737
return project.roles
3838
?.map(
3939
(final r) => '${r.name}: ${(r.memberships ?? []).map(

serverpod_cloud_cli/test_integration/commands/admin/admin_project_list_cmd_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void main() {
8585
Role(
8686
id: 11,
8787
projectId: 1,
88-
name: 'Owners',
88+
name: 'Admin',
8989
projectScopes: ['P0-all'],
9090
memberships: [
9191
UserRoleMembership(
@@ -108,7 +108,7 @@ void main() {
108108
Role(
109109
id: 12,
110110
projectId: 2,
111-
name: 'Owners',
111+
name: 'Admin',
112112
projectScopes: ['P0-all'],
113113
memberships: [
114114
UserRoleMembership(
@@ -144,16 +144,16 @@ void main() {
144144
containsAllInOrder([
145145
equalsLineCall(
146146
line:
147-
'Project Id | Created at (local) | Archived at (local) | Owners '),
147+
'Project Id | Created at (local) | Archived at (local) | Admin '),
148148
equalsLineCall(
149149
line:
150-
'-----------+---------------------+---------------------+-------------------------'),
150+
'-----------+---------------------+---------------------+------------------------'),
151151
equalsLineCall(
152152
line:
153-
'projectId | 2025-07-02 11:00:00 | | Owners: test@example.com'),
153+
'projectId | 2025-07-02 11:00:00 | | Admin: test@example.com'),
154154
equalsLineCall(
155155
line:
156-
'projectId2 | 2025-07-02 12:00:00 | 2025-07-02 12:10:00 | Owners: test@example.com'),
156+
'projectId2 | 2025-07-02 12:00:00 | 2025-07-02 12:10:00 | Admin: test@example.com'),
157157
]),
158158
);
159159
});

serverpod_cloud_cli/test_integration/commands/project_command/invite_project_user_test.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void main() {
5757
'--user',
5858
'test@example.com',
5959
'--role',
60-
'owners',
60+
'admin',
6161
]);
6262
});
6363

@@ -88,7 +88,7 @@ void main() {
8888
'--user',
8989
'test@example.com',
9090
'--role',
91-
'owners',
91+
'admin',
9292
]);
9393
});
9494

@@ -133,7 +133,7 @@ void main() {
133133
'--user',
134134
'test@example.com',
135135
'--role',
136-
'owners',
136+
'admin',
137137
]);
138138
});
139139

@@ -145,7 +145,7 @@ void main() {
145145
expect(
146146
logger.successCalls.single,
147147
equalsSuccessCall(
148-
message: 'User invited to the project with roles: owners.',
148+
message: 'User invited to the project with roles: admin.',
149149
newParagraph: true,
150150
),
151151
);
@@ -171,7 +171,7 @@ void main() {
171171
'--user',
172172
'test@example.com',
173173
'--role',
174-
'owners',
174+
'admin',
175175
]);
176176
});
177177

@@ -200,7 +200,7 @@ void main() {
200200
unassignRoleNames: any(named: 'unassignRoleNames'),
201201
unassignAllRoles: any(named: 'unassignAllRoles'),
202202
)).thenAnswer(
203-
(final invocation) async => Future.value(['owners']),
203+
(final invocation) async => Future.value(['admin']),
204204
);
205205

206206
commandResult = cli.run([
@@ -211,7 +211,7 @@ void main() {
211211
'--user',
212212
'test@example.com',
213213
'--role',
214-
'owners',
214+
'admin',
215215
]);
216216
});
217217

@@ -223,8 +223,7 @@ void main() {
223223
expect(
224224
logger.successCalls.single,
225225
equalsSuccessCall(
226-
message:
227-
'Revoked access roles of the user from the project: owners',
226+
message: 'Revoked access roles of the user from the project: admin',
228227
newParagraph: true,
229228
),
230229
);
@@ -242,7 +241,7 @@ void main() {
242241
unassignRoleNames: any(named: 'unassignRoleNames'),
243242
unassignAllRoles: any(named: 'unassignAllRoles'),
244243
)).thenAnswer(
245-
(final invocation) async => Future.value(['owners']),
244+
(final invocation) async => Future.value(['admin']),
246245
);
247246

248247
commandResult = cli.run([
@@ -265,7 +264,7 @@ void main() {
265264
logger.successCalls.single,
266265
equalsSuccessCall(
267266
message:
268-
"Revoked all access roles of the user from the project: owners",
267+
"Revoked all access roles of the user from the project: admin",
269268
newParagraph: true,
270269
),
271270
);
@@ -293,7 +292,7 @@ void main() {
293292
'--user',
294293
'test@example.com',
295294
'--role',
296-
'owners',
295+
'admin',
297296
]);
298297
});
299298

serverpod_cloud_cli/test_integration/commands/user/user_list_command_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void main() {
8787
roleId: 1,
8888
role: Role(
8989
projectId: 1,
90-
name: 'Owners',
90+
name: 'Admin',
9191
projectScopes: [],
9292
),
9393
),
@@ -119,7 +119,7 @@ void main() {
119119
equalsLineCall(
120120
line: '-----------------+-----------+--------------'),
121121
equalsLineCall(
122-
line: 'test@example.com | projectId | Owners '),
122+
line: 'test@example.com | projectId | Admin '),
123123
]),
124124
);
125125
});

0 commit comments

Comments
 (0)