@Test public void hasAccess() throws Exception { LocalDocumentReference localReference = new LocalDocumentReference("space", "page"); this.mocker.getComponentUnderTest().hasAccess(Right.VIEW, localReference); verify(this.authorizationManager).hasAccess(same(Right.VIEW), isNull(DocumentReference.class), eq(new DocumentReference(localReference, this.currentWikiReference))); }
@Override public boolean hasAccess(Right right) { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { return hasAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } return hasAccess(right, getCurrentEntity()); }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public boolean hasAccess(Right right) { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { return hasAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } return hasAccess(right, getCurrentEntity()); } }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public boolean hasAccess(Right right) { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { return hasAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } return hasAccess(right, getCurrentEntity()); }  }
DefaultContextualAuthorizationManager implements ContextualAuthorizationManager { @Override public boolean hasAccess(Right right) { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { return hasAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } return hasAccess(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 boolean hasAccess(Right right) { if (CONTENT_AUTHOR_RIGHTS.contains(right)) { return hasAccess(right, getCurrentUser(right, null), getCurrentAuthorDocumentReference(right)); } return hasAccess(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);  }