canWrite method

bool canWrite(
  1. String table, {
  2. List<String>? namespace,
})

Implementation

bool canWrite(String table, {List<String>? namespace}) {
  if (tables == null) return true;

  final matches = _matchingTables(table: table, namespace: namespace);
  if (matches.isEmpty) {
    return false;
  }
  return matches.any((tableGrant) => tableGrant.write);
}