Skip to content

Commit af00f1d

Browse files
author
serverpod_cloud
committed
feat: 177008e91013576aa81759839e11138a8d32f5ea
1 parent 4e00911 commit af00f1d

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,15 @@ class EndpointUsers extends _i1.EndpointRef {
607607
'readUser',
608608
{},
609609
);
610+
611+
/// Reads all users that have a role in the specified project.
612+
_i2.Future<List<_i18.User>> listUsersInProject(
613+
{required String cloudProjectId}) =>
614+
caller.callServerEndpoint<List<_i18.User>>(
615+
'users',
616+
'listUsersInProject',
617+
{'cloudProjectId': cloudProjectId},
618+
);
610619
}
611620

612621
class Modules {

ground_control_client/lib/src/protocol/protocol.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ import 'package:ground_control_client/src/protocol/domains/status/models/deploy_
6767
as _i46;
6868
import 'package:ground_control_client/src/protocol/domains/status/models/deploy_attempt_stage.dart'
6969
as _i47;
70-
import 'package:serverpod_auth_client/serverpod_auth_client.dart' as _i48;
70+
import 'package:ground_control_client/src/protocol/domains/users/models/user.dart'
71+
as _i48;
72+
import 'package:serverpod_auth_client/serverpod_auth_client.dart' as _i49;
7173
export 'domains/capsules/models/capsule.dart';
7274
export 'domains/logs/models/log_record.dart';
7375
export 'domains/status/models/deploy_attempt.dart';
@@ -470,8 +472,11 @@ class Protocol extends _i1.SerializationManager {
470472
.map((e) => deserialize<_i47.DeployAttemptStage>(e))
471473
.toList() as T;
472474
}
475+
if (t == List<_i48.User>) {
476+
return (data as List).map((e) => deserialize<_i48.User>(e)).toList() as T;
477+
}
473478
try {
474-
return _i48.Protocol().deserialize<T>(data, t);
479+
return _i49.Protocol().deserialize<T>(data, t);
475480
} on _i1.DeserializationTypeNotFoundException catch (_) {}
476481
return super.deserialize<T>(data, t);
477482
}
@@ -597,7 +602,7 @@ class Protocol extends _i1.SerializationManager {
597602
if (data is _i40.ServerpodRegion) {
598603
return 'ServerpodRegion';
599604
}
600-
className = _i48.Protocol().getClassNameForObject(data);
605+
className = _i49.Protocol().getClassNameForObject(data);
601606
if (className != null) {
602607
return 'serverpod_auth.$className';
603608
}
@@ -729,7 +734,7 @@ class Protocol extends _i1.SerializationManager {
729734
}
730735
if (dataClassName.startsWith('serverpod_auth.')) {
731736
data['className'] = dataClassName.substring(15);
732-
return _i48.Protocol().deserializeByClassName(data);
737+
return _i49.Protocol().deserializeByClassName(data);
733738
}
734739
return super.deserializeByClassName(data);
735740
}

0 commit comments

Comments
 (0)