");
- // show the icon for the sandbox as a clickable browse link image
- // this is currently identical to the sandbox_browse action as below
- Utils.encodeRecursive(context, aquireAction(
- context, mainStore, username, "sandbox_icon", WebResources.IMAGE_USERSANDBOX_32,
- "#{AVMBrowseBean.setupSandboxAction}", "browseSandbox", null));
- out.write(" | ");
- out.write("");
- out.write(bundle.getString(MSG_USERNAME));
- out.write(": ");
- out.write(username);
- out.write(" (");
- out.write(bundle.getString(userrole));
- out.write(") | ");
-
- // direct actions for a sandbox
- String sandboxUrl = AVMConstants.buildAVMStoreUrl(mainStore);
- Utils.encodeRecursive(context, aquireAction(
- context, mainStore, username, "sandbox_preview", "/images/icons/preview_website.gif",
- null, null, sandboxUrl));
- out.write(" ");
-
- Utils.encodeRecursive(context, aquireAction(
- context, mainStore, username, "sandbox_create", "/images/icons/new_content.gif",
- "#{AVMBrowseBean.setupSandboxAction}", "wizard:createWebContent", null));
- out.write(" ");
-
- Utils.encodeRecursive(context, aquireAction(
- context, mainStore, username, "sandbox_submitall", "/images/icons/submit.gif",
- "#{AVMBrowseBean.submitAll}", null, null));
- out.write(" ");
-
- Utils.encodeRecursive(context, aquireAction(
- context, mainStore, username, "sandbox_browse", "/images/icons/space_small.gif",
- "#{AVMBrowseBean.setupSandboxAction}", "browseSandbox", null));
- out.write(" |
");
-
- // modified items panel
- out.write(" | ");
- String panelImage = WebResources.IMAGE_COLLAPSED;
- if (this.expandedPanels.contains(username))
+ logger.debug("Checking user permissions for store: " + mainStore);
+ if (permissionService.hasPermission(
+ AVMNodeConverter.ToNodeRef(-1, AVMConstants.buildAVMStoreRootPath(mainStore)),
+ PermissionService.READ) == AccessStatus.ALLOWED)
{
- panelImage = WebResources.IMAGE_EXPANDED;
- }
- out.write(Utils.buildImageTag(context, panelImage, 11, 11, "",
- Utils.generateFormSubmit(context, this, getClientId(context), username)));
- out.write(" ");
- out.write(bundle.getString(MSG_MODIFIED_ITEMS));
- out.write("");
- if (this.expandedPanels.contains(username))
- {
- out.write("");
-
- // list the modified docs for this sandbox user
- renderUserFiles(context, out, username, storeRoot);
- }
- out.write(" |