@Test public void testIsViewPermitted_permitted() throws Exception { when(securityHelper .anyPermitted(eq(new RepositoryViewPermission("repoFormat", "repoName", Arrays.asList(BreadActions.READ))))) .thenReturn(true); assertThat(impl.isViewPermitted("repoName", "repoFormat", BreadActions.READ), is(true)); }
@VisibleForTesting public boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action) { return securityHelper.anyPermitted(new RepositoryViewPermission(repositoryFormat, repositoryName, action)); }
ContentPermissionCheckerImpl extends ComponentSupport implements ContentPermissionChecker { @VisibleForTesting public boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action) { return securityHelper.anyPermitted(new RepositoryViewPermission(repositoryFormat, repositoryName, action)); } }
ContentPermissionCheckerImpl extends ComponentSupport implements ContentPermissionChecker { @VisibleForTesting public boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action) { return securityHelper.anyPermitted(new RepositoryViewPermission(repositoryFormat, repositoryName, action)); } @Inject  ContentPermissionCheckerImpl(final SecurityHelper securityHelper,
                                      final SelectorManager selectorManager); }
ContentPermissionCheckerImpl extends ComponentSupport implements ContentPermissionChecker { @VisibleForTesting public boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action) { return securityHelper.anyPermitted(new RepositoryViewPermission(repositoryFormat, repositoryName, action)); } @Inject  ContentPermissionCheckerImpl(final SecurityHelper securityHelper,
                                      final SelectorManager selectorManager); @VisibleForTesting boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action); @VisibleForTesting boolean isViewPermitted(final Set<String> repositoryNames, final String repositoryFormat, final String action); @VisibleForTesting boolean isContentPermitted(final String repositoryName,
                                    final String repositoryFormat,
                                    final String action,
                                    final SelectorConfiguration selectorConfiguration,
                                    final VariableSource variableSource); @VisibleForTesting boolean isContentPermitted(final Set<String> repositoryNames,
                                    final String repositoryFormat,
                                    final String action,
                                    final SelectorConfiguration selectorConfiguration,
                                    final VariableSource variableSource); @Override boolean isPermitted(final String repositoryName,
                             final String repositoryFormat,
                             final String action,
                             final VariableSource variableSource); @Override boolean isPermittedJexlOnly(final String repositoryName,
                                     final String repositoryFormat,
                                     final String action,
                                     final VariableSource variableSource); @Override boolean isPermitted(final Set<String> repositoryNames,
                             final String repositoryFormat,
                             final String action,
                             final VariableSource variableSource); }
ContentPermissionCheckerImpl extends ComponentSupport implements ContentPermissionChecker { @VisibleForTesting public boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action) { return securityHelper.anyPermitted(new RepositoryViewPermission(repositoryFormat, repositoryName, action)); } @Inject  ContentPermissionCheckerImpl(final SecurityHelper securityHelper,
                                      final SelectorManager selectorManager); @VisibleForTesting boolean isViewPermitted(final String repositoryName, final String repositoryFormat, final String action); @VisibleForTesting boolean isViewPermitted(final Set<String> repositoryNames, final String repositoryFormat, final String action); @VisibleForTesting boolean isContentPermitted(final String repositoryName,
                                    final String repositoryFormat,
                                    final String action,
                                    final SelectorConfiguration selectorConfiguration,
                                    final VariableSource variableSource); @VisibleForTesting boolean isContentPermitted(final Set<String> repositoryNames,
                                    final String repositoryFormat,
                                    final String action,
                                    final SelectorConfiguration selectorConfiguration,
                                    final VariableSource variableSource); @Override boolean isPermitted(final String repositoryName,
                             final String repositoryFormat,
                             final String action,
                             final VariableSource variableSource); @Override boolean isPermittedJexlOnly(final String repositoryName,
                                     final String repositoryFormat,
                                     final String action,
                                     final VariableSource variableSource); @Override boolean isPermitted(final Set<String> repositoryNames,
                             final String repositoryFormat,
                             final String action,
                             final VariableSource variableSource);  }