checkRights #
Available since Kuzzle 2.8.0
Available since 2.2.0
Checks if the provided API request can be executed by this client, using the current authentication information.
Future<bool> checkRights(
Map<String, dynamic> requestPayload)
Property | Type | Description |
---|---|---|
requestPayload | Map<String, dynamic> | Contains a RequestPayload |
requestPayload
#
The RequestPayload must contain at least the following properties:
controller
: API controlleraction
: API action
Returns #
Returns a boolean telling whether the provided request is allowed or not.
Usage #
final requestPayload = {
'controller': 'document',
'action': 'create',
'index': 'nyc-open-data',
'collection': 'yellow-taxi',
'body': {
'name': 'Melis'
}
};
final result = await kuzzle
.auth
.checkRights(requestPayload);
Edit this page on Github(opens new window)