getMyRights method

Future<List<Map<String, dynamic>>> getMyRights()

Gets the rights array of the currently logged user

Implementation

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

  return (response.result['hits'] as List<dynamic>)
      .map<Map<String, dynamic>>((a) => a as Map<String, dynamic>)
      .toList();
}