createOrReplaceRole method
Creates a new role or, if the provided role identifier already exists, replaces it.
Implementation
Future<KuzzleRole> createOrReplaceRole(
String id,
Map<String, dynamic> controllers, {
bool? waitForRefresh,
bool? force,
}) async {
final response = await kuzzle.query(KuzzleRequest(
controller: name,
action: 'createOrReplaceRole',
uid: id,
force: force,
waitForRefresh: waitForRefresh,
body: <String, dynamic>{
'controllers': controllers,
},
));
return KuzzleRole.fromKuzzleResponse(kuzzle, response);
}