@Test public void testPathPermitted() { when(contentAuthHelper.checkPathPermissions(PATH, FORMAT, new String[]{REPOSITORY_NAME})).thenReturn(true); assertThat(underTest.execute(underTest, null, null, new Object[] { PATH, FORMAT, REPOSITORY_NAME }, null), is(true)); verify(contentAuthHelper, times(1)).checkPathPermissions(PATH, FORMAT, new String[]{REPOSITORY_NAME}); }
@Override public Object execute(final Object iThis, final OIdentifiable iCurrentRecord, final Object iCurrentResult, final Object[] iParams, final OCommandContext iContext) { String path = (String) iParams[0]; String format = (String) iParams[1]; String browsedRepositoryName = (String) iParams[2]; boolean jexlOnly = iParams.length > 3 && (boolean) iParams[3]; if (jexlOnly) { return contentAuthHelper.checkPathPermissionsJexlOnly(path, format, browsedRepositoryName); } return contentAuthHelper.checkPathPermissions(path, format, browsedRepositoryName); }
ContentAuth extends OSQLFunctionAbstract { @Override public Object execute(final Object iThis, final OIdentifiable iCurrentRecord, final Object iCurrentResult, final Object[] iParams, final OCommandContext iContext) { String path = (String) iParams[0]; String format = (String) iParams[1]; String browsedRepositoryName = (String) iParams[2]; boolean jexlOnly = iParams.length > 3 && (boolean) iParams[3]; if (jexlOnly) { return contentAuthHelper.checkPathPermissionsJexlOnly(path, format, browsedRepositoryName); } return contentAuthHelper.checkPathPermissions(path, format, browsedRepositoryName); } }
ContentAuth extends OSQLFunctionAbstract { @Override public Object execute(final Object iThis, final OIdentifiable iCurrentRecord, final Object iCurrentResult, final Object[] iParams, final OCommandContext iContext) { String path = (String) iParams[0]; String format = (String) iParams[1]; String browsedRepositoryName = (String) iParams[2]; boolean jexlOnly = iParams.length > 3 && (boolean) iParams[3]; if (jexlOnly) { return contentAuthHelper.checkPathPermissionsJexlOnly(path, format, browsedRepositoryName); } return contentAuthHelper.checkPathPermissions(path, format, browsedRepositoryName); } @Inject  ContentAuth(final OrientContentAuthHelper contentAuthHelper); }
ContentAuth extends OSQLFunctionAbstract { @Override public Object execute(final Object iThis, final OIdentifiable iCurrentRecord, final Object iCurrentResult, final Object[] iParams, final OCommandContext iContext) { String path = (String) iParams[0]; String format = (String) iParams[1]; String browsedRepositoryName = (String) iParams[2]; boolean jexlOnly = iParams.length > 3 && (boolean) iParams[3]; if (jexlOnly) { return contentAuthHelper.checkPathPermissionsJexlOnly(path, format, browsedRepositoryName); } return contentAuthHelper.checkPathPermissions(path, format, browsedRepositoryName); } @Inject  ContentAuth(final OrientContentAuthHelper contentAuthHelper); @Override Object execute(final Object iThis,
                        final OIdentifiable iCurrentRecord,
                        final Object iCurrentResult,
                        final Object[] iParams,
                        final OCommandContext iContext); @Override String getSyntax(); }
ContentAuth extends OSQLFunctionAbstract { @Override public Object execute(final Object iThis, final OIdentifiable iCurrentRecord, final Object iCurrentResult, final Object[] iParams, final OCommandContext iContext) { String path = (String) iParams[0]; String format = (String) iParams[1]; String browsedRepositoryName = (String) iParams[2]; boolean jexlOnly = iParams.length > 3 && (boolean) iParams[3]; if (jexlOnly) { return contentAuthHelper.checkPathPermissionsJexlOnly(path, format, browsedRepositoryName); } return contentAuthHelper.checkPathPermissions(path, format, browsedRepositoryName); } @Inject  ContentAuth(final OrientContentAuthHelper contentAuthHelper); @Override Object execute(final Object iThis,
                        final OIdentifiable iCurrentRecord,
                        final Object iCurrentResult,
                        final Object[] iParams,
                        final OCommandContext iContext); @Override String getSyntax(); static final String NAME; }