getAncillaryPermissions method
Return all system console subsection ancillary permissions
Returns all the ancillary permissions for the corresponding system console subsection permissions appended to the requested permission subsections. Minimum server version: 5.35
Parameters:
- String subsectionPermissions: The subsection permissions to return the ancillary permissions for. These values are comma seperated. Ex. subsection_permissions=sysconsole_read_reporting_site_statistics,sysconsole_write_reporting_site_statistics,sysconsole_write_user_management_channels
Implementation
Future<List<String>?> getAncillaryPermissions({
String? subsectionPermissions,
}) async {
final response = await getAncillaryPermissionsWithHttpInfo(
subsectionPermissions: subsectionPermissions,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw MmApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<String>') as List).cast<String>().toList();
}
return null;
}