@Test public void hasAccessIsFalseIfNullUser() { Assert.assertFalse(this.component.hasAccess(null, Right.EDIT, PT_DOC)); }
@Override public Boolean hasAccess( @Nullable final User user, @Nonnull final Right access, @Nonnull final EntityReference entity) { if (!entity.toString().contains(TEMPLATE) || access.isReadOnly()) { return null; } return user != null && user.getProfileDocument() != null && this.auth.hasAccess(user, Right.ADMIN, this.resolver.resolve(Constants.XWIKI_SPACE_REFERENCE)); }
AdminTemplateAccessAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess( @Nullable final User user, @Nonnull final Right access, @Nonnull final EntityReference entity) { if (!entity.toString().contains(TEMPLATE) || access.isReadOnly()) { return null; } return user != null && user.getProfileDocument() != null && this.auth.hasAccess(user, Right.ADMIN, this.resolver.resolve(Constants.XWIKI_SPACE_REFERENCE)); } }
AdminTemplateAccessAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess( @Nullable final User user, @Nonnull final Right access, @Nonnull final EntityReference entity) { if (!entity.toString().contains(TEMPLATE) || access.isReadOnly()) { return null; } return user != null && user.getProfileDocument() != null && this.auth.hasAccess(user, Right.ADMIN, this.resolver.resolve(Constants.XWIKI_SPACE_REFERENCE)); }  }
AdminTemplateAccessAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess( @Nullable final User user, @Nonnull final Right access, @Nonnull final EntityReference entity) { if (!entity.toString().contains(TEMPLATE) || access.isReadOnly()) { return null; } return user != null && user.getProfileDocument() != null && this.auth.hasAccess(user, Right.ADMIN, this.resolver.resolve(Constants.XWIKI_SPACE_REFERENCE)); }  @Override int getPriority(); @Override Boolean hasAccess(
        @Nullable final User user,
        @Nonnull final Right access,
        @Nonnull final EntityReference entity); }
AdminTemplateAccessAuthorizationModule implements AuthorizationModule { @Override public Boolean hasAccess( @Nullable final User user, @Nonnull final Right access, @Nonnull final EntityReference entity) { if (!entity.toString().contains(TEMPLATE) || access.isReadOnly()) { return null; } return user != null && user.getProfileDocument() != null && this.auth.hasAccess(user, Right.ADMIN, this.resolver.resolve(Constants.XWIKI_SPACE_REFERENCE)); }  @Override int getPriority(); @Override Boolean hasAccess(
        @Nullable final User user,
        @Nonnull final Right access,
        @Nonnull final EntityReference entity);  }