+ /* Exposes this to the children workspace group */
+ protected boolean isWorkspaceVisible(String wkspName) {
+ Boolean result = true;
+ if (ARGEO_SYSTEM_WKSP.contains(wkspName))
+ return false;
+ // Add a supplementary check to hide workspace that are not
+ // public to anonymous user
+ if (repoNode == null) {
+ Session tmpSession = null;
+ try {
+ tmpSession = repository.login(wkspName);
+ try {
+ tmpSession.checkPermission("/", "read");
+ } catch (AccessControlException e) {
+ result = false;
+ }
+ } catch (RepositoryException e) {
+ throw new SlcException(
+ "Cannot list workspaces for anonymous user", e);
+ } finally {
+ JcrUtils.logoutQuietly(tmpSession);
+ }
+ }
+ return result;