/** * @see org.opencms.ui.dialogs.permissions.CmsPermissionView.PermissionChangeHandler#setPermissions(java.lang.String, java.lang.String, int, int, int) */ public void setPermissions(String principalType, String principalName, int allowed, int denied, int flags) { try { ensureLock(); m_cms.chacc(m_cms.getSitePath(m_resource), principalType, principalName, allowed, denied, flags); } catch (CmsException e) { m_context.error(e); } }
/** * Changes the access control for a given resource and a given principal(user/group). * * @param resourceName name of the resource * @param principalType the type of the principal (group or user) * @param principalName name of the principal * @param permissionString the permissions in the format ((+|-)(r|w|v|c|i))* * @throws CmsException if something goes wrong * @see CmsObject#chacc(String, String, String, String) */ public void chacc(String resourceName, String principalType, String principalName, String permissionString) throws CmsException { m_cms.lockResource(resourceName); if (I_CmsPrincipal.PRINCIPAL_GROUP.equalsIgnoreCase(principalType.trim())) { principalName = OpenCms.getImportExportManager().translateGroup(principalName); } else { principalName = OpenCms.getImportExportManager().translateUser(principalName); } m_cms.chacc(resourceName, principalType, principalName, permissionString); }
/** * Changes the access control for a given resource and a given principal(user/group). * * @param resourceName name of the resource * @param principalType the type of the principal (group or user) * @param principalName name of the principal * @param permissionString the permissions in the format ((+|-)(r|w|v|c|i))* * @throws CmsException if something goes wrong * @see CmsObject#chacc(String, String, String, String) */ public void chacc(String resourceName, String principalType, String principalName, String permissionString) throws CmsException { m_cms.lockResource(resourceName); if (I_CmsPrincipal.PRINCIPAL_GROUP.equalsIgnoreCase(principalType.trim())) { principalName = OpenCms.getImportExportManager().translateGroup(principalName); } else { principalName = OpenCms.getImportExportManager().translateUser(principalName); } m_cms.chacc(resourceName, principalType, principalName, permissionString); }
/** * Contains the visibility handler configuration for a content field path.<p> */ protected static class VisibilityConfiguration { /** The handler instance. */ private I_CmsXmlContentVisibilityHandler m_handler; /** The handler configuration parameters. */ private String m_params; /** * Constructor.<p> * * @param handler the handler instance * @param params the handler configuration parameteres */ protected VisibilityConfiguration(I_CmsXmlContentVisibilityHandler handler, String params) { m_handler = handler; m_params = params; } /** * Returns the visibility handler instance.<p> * * @return the handler instance */ public I_CmsXmlContentVisibilityHandler getHandler() {
m_cms.chacc( m_cms.getSitePath(m_resource), principalType, permissionString); } else if (principalName.equals(CmsVaadinUtils.getMessageText(Messages.GUI_LABEL_OVERWRITEALL_0))) { m_cms.chacc( m_cms.getSitePath(m_resource), principalType, m_cms.chacc(m_cms.getSitePath(m_resource), principalType, principalName, permissionString);
m_cms.chacc("/shared", "group", "Users", "+v+w+r+i"); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e);
cms.chacc( temporaryFilename, I_CmsPrincipal.PRINCIPAL_GROUP,