checkRights method

Future<bool> checkRights(
  1. Map<String, dynamic> requestPayload
)

Checks if an API action can be executed by the current user.

Implementation

Future<bool> checkRights(Map<String, dynamic> requestPayload) async {
  final response = await kuzzle.query(KuzzleRequest(
    controller: name,
    action: 'checkRights',
    body: requestPayload,
  ));

  return response.result['allowed'] as bool;
}