@Test public void testGetObservableRepositoryIds() throws Exception { createUser( USER_ALPACA, "Al 'Archiva' Paca" ); assertEquals( "Expected users", 3, securitySystem.getUserManager().getUsers().size() ); setupRepository( "central" ); setupRepository( "corporate" ); setupRepository( "internal" ); setupRepository( "snapshots" ); setupRepository( "secret" ); assignRepositoryObserverRole( USER_ALPACA, "corporate" ); assignRepositoryObserverRole( USER_ALPACA, "central" ); assignRepositoryObserverRole( USER_GUEST, "corporate" ); assignGlobalRepositoryObserverRole( USER_ADMIN ); assertRepoIds( new String[]{ "central", "corporate" }, userRepos.getObservableRepositoryIds( USER_ALPACA ) ); assertRepoIds( new String[]{ "coporate" }, userRepos.getObservableRepositoryIds( USER_GUEST ) ); assertRepoIds( new String[]{ "central", "internal","corporate", "snapshots", "secret" }, userRepos.getObservableRepositoryIds( USER_ADMIN ) ); }
@Override public List<String> getObservableRepositoryIds( String principal ) throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException { String operation = ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS; return getAccessibleRepositoryIds( principal, operation ); }
DefaultUserRepositories implements UserRepositories { @Override public List<String> getObservableRepositoryIds( String principal ) throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException { String operation = ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS; return getAccessibleRepositoryIds( principal, operation ); } }
DefaultUserRepositories implements UserRepositories { @Override public List<String> getObservableRepositoryIds( String principal ) throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException { String operation = ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS; return getAccessibleRepositoryIds( principal, operation ); }  }
DefaultUserRepositories implements UserRepositories { @Override public List<String> getObservableRepositoryIds( String principal ) throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException { String operation = ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS; return getAccessibleRepositoryIds( principal, operation ); }  @Override List<String> getObservableRepositoryIds( String principal ); @Override List<String> getManagableRepositoryIds( String principal ); @Override List<ManagedRepository> getAccessibleRepositories( String principal ); @Override List<ManagedRepository> getManagableRepositories(String principal); @Override void createMissingRepositoryRoles( String repoId ); @Override boolean isAuthorizedToUploadArtifacts( String principal, String repoId ); @Override boolean isAuthorizedToDeleteArtifacts( String principal, String repoId ); SecuritySystem getSecuritySystem(); void setSecuritySystem( SecuritySystem securitySystem ); RoleManager getRoleManager(); void setRoleManager( RoleManager roleManager ); }
DefaultUserRepositories implements UserRepositories { @Override public List<String> getObservableRepositoryIds( String principal ) throws PrincipalNotFoundException, AccessDeniedException, ArchivaSecurityException { String operation = ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS; return getAccessibleRepositoryIds( principal, operation ); }  @Override List<String> getObservableRepositoryIds( String principal ); @Override List<String> getManagableRepositoryIds( String principal ); @Override List<ManagedRepository> getAccessibleRepositories( String principal ); @Override List<ManagedRepository> getManagableRepositories(String principal); @Override void createMissingRepositoryRoles( String repoId ); @Override boolean isAuthorizedToUploadArtifacts( String principal, String repoId ); @Override boolean isAuthorizedToDeleteArtifacts( String principal, String repoId ); SecuritySystem getSecuritySystem(); void setSecuritySystem( SecuritySystem securitySystem ); RoleManager getRoleManager(); void setRoleManager( RoleManager roleManager );  }