if (!authManager.authorize(user, getTableName(e), cell, false, action)) {
AuthResult authResult = AuthResult.deny(request, "Insufficient permissions",
user, action, getTableName(e), CellUtil.cloneFamily(cell),
CellUtil.cloneQualifier(cell));
logResult(authResult);
throw new AccessDeniedException("Insufficient permissions " +
authResult.toContextString());
}
}
cellsChecked++;
}
} while (more);
} catch (AccessDeniedException ex) {
throw ex;
} catch (IOException ex) {
LOG.error("Exception while getting cells to calculate covering permission", ex);
} finally {
scanner.close();
}
}
// If there were no cells to check, throw the ADE
if (cellsChecked < 1) {
if (LOG.isTraceEnabled()) {
LOG.trace("No cells found with scan");
}
AuthResult authResult = AuthResult.deny(request, "Insufficient permissions",
user, cellCheckActions.get(0), getTableName(e), familyMap);
logResult(authResult);
throw new AccessDeniedException("Insufficient permissions " +
authResult.toContextString());
}
// Log that authentication succeeded. We need to trade off logging maybe
// thousands of fine grained decisions with providing detail.