@Override public void checkAccess(Right right, DocumentReference userReference, EntityReference entityReference) throws AccessDeniedException { try { if (!hasSecurityAccess(right, userReference, entityReference, true)) { throw new AccessDeniedException(right, userReference, entityReference); } } catch (Exception e) { if (e instanceof AccessDeniedException) { throw (AccessDeniedException) e; } else { throw new AccessDeniedException(right, userReference, entityReference, e); } } }
private void checkAccess(Right right, DocumentReference user, EntityReference entity) throws AccessDeniedException { if (!checkPreAccess(right)) { throw new AccessDeniedException(right, user, entity); } this.authorizationManager.checkAccess(right, user, getFullReference(entity)); }
throw new AccessDeniedException(context.getUserReference(), wikiReference); } else {