Ejemplo n.º 1
0
  private boolean authorize(
      List<TablePermission> perms, byte[] table, KeyValue kv, TablePermission.Action action) {
    if (perms != null) {
      for (TablePermission p : perms) {
        if (p.implies(table, kv, action)) {
          return true;
        }
      }
    } else if (LOG.isDebugEnabled()) {
      LOG.debug("No permissions for authorize() check, table=" + Bytes.toStringBinary(table));
    }

    return false;
  }
Ejemplo n.º 2
0
 private boolean authorize(
     List<TablePermission> perms,
     byte[] table,
     byte[] family,
     byte[] qualifier,
     Permission.Action action) {
   if (perms != null) {
     for (TablePermission p : perms) {
       if (p.implies(table, family, qualifier, action)) {
         return true;
       }
     }
   } else if (LOG.isDebugEnabled()) {
     LOG.debug("No permissions found for table=" + Bytes.toStringBinary(table));
   }
   return false;
 }