checkPermission method

  1. @override
bool checkPermission(
  1. dynamic operation
)
override

Checks if a permission is granted for the given operation.

The operation can be any object (typically a Map or enum describing the type of permission needed).

Returns true if the operation is allowed, false otherwise. Returns true by default if no permission checking is configured.

Implementation

@override
bool checkPermission(dynamic operation) {
  // If a permission checker is provided, use it
  if (_permissionChecker != null) {
    return _permissionChecker(operation);
  }
  // Otherwise, be permissive (allow all)
  return true;
}