isAllowed method

bool isAllowed(
  1. String path,
  2. Method method, {
  3. Map<String, dynamic> variables = const {},
})

Evaluates whether an operation is allowed or not. path is the full path from root without a starting '/'.

Implementation

bool isAllowed(String path, Method method,
    {Map<String, dynamic> variables = const {}}) {
  assert(!path.startsWith('/'));
  for (final match in service.pathMatches) {
    if (match.isAllowed(path.concretePathSegments, method,
        variables: variables, logger: logger)) {
      return true;
    }
  }
  return false;
}