chmod method
- String token,
- int userId,
- PlanMemberAccessType accessType
override
Modifies the access type of the member with the given userId
in the plan of the user associated with the given token
.
Implementation
@override
Future<void> chmod(String token, int userId, PlanMemberAccessType accessType) async {
log('Changing access type of user $userId to $accessType');
try {
await _apiService.callFunction(
function: 'local_lbplanner_plan_update_access',
token: token,
body: {
'memberid': userId,
'accesstype': accessType.index,
},
);
log('Access type of user $userId changed to $accessType');
} catch (e, s) {
log('Failed to change access type of user $userId to $accessType', e, s);
rethrow;
}
}