@Test public void checkAccess() throws Exception { LocalDocumentReference localReference = new LocalDocumentReference("space", "page"); this.mocker.getComponentUnderTest().checkAccess(Right.VIEW, localReference); verify(this.authorizationManager).checkAccess(same(Right.VIEW), isNull(DocumentReference.class), eq(new DocumentReference(localReference, this.currentWikiReference))); }
@Override public void checkAccess(Right right) throws AccessDeniedException { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { checkAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } else { checkAccess(right, getCurrentEntity()); } }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public void checkAccess(Right right) throws AccessDeniedException { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { checkAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } else { checkAccess(right, getCurrentEntity()); } } }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public void checkAccess(Right right) throws AccessDeniedException { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { checkAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } else { checkAccess(right, getCurrentEntity()); } }  }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public void checkAccess(Right right) throws AccessDeniedException { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { checkAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } else { checkAccess(right, getCurrentEntity()); } }  @Override void checkAccess(Right right); @Override void checkAccess(Right right, EntityReference entity); @Override boolean hasAccess(Right right); @Override boolean hasAccess(Right right, EntityReference entity); }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public void checkAccess(Right right) throws AccessDeniedException { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { checkAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } else { checkAccess(right, getCurrentEntity()); } }  @Override void checkAccess(Right right); @Override void checkAccess(Right right, EntityReference entity); @Override boolean hasAccess(Right right); @Override boolean hasAccess(Right right, EntityReference entity);  }