Files
ofbiz-framework/applications/content/widget/CommonScreens.xml
T
Jacques Le Roux ef9582c387 A patch from Pierre Smits for "User with update permission can't access screens in content application" https://issues.apache.org/jira/browse/OFBIZ-5676
When a user has security permission 'CONTENTMGR_UPDATE' he should be able to access various screens in the content application, but he can't.

This applies to screens associated to menu-items:
Content
DataSource
Content Setup
DataResource Setup
Template
CMS

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609885 13f79535-47bb-0310-9956-ffa450edef68
2014-07-12 07:13:49 +00:00

497 lines
25 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="main-decorator">
<section>
<actions>
<!-- base/top/specific map first, then more common map added for shared labels -->
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.ContentCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.ContentCompanySubtitle" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/content/images/contentForum.css" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
<set field="activeApp" value="contentmgr" global="true"/>
<set field="applicationMenuName" value="ContentAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://content/widget/content/ContentMenus.xml" global="true"/>
<set field="applicationTitle" value="${uiLabelMap.ContentContentManagerApplication}"/>
</actions>
<widgets>
<include-screen name="ApplicationDecorator" location="component://commonext/widget/CommonScreens.xml"/>
</widgets>
</section>
</screen>
<screen name="commonCmsDecorator">
<section>
<actions>
<set field="currentCMSMenuItemName" from-field="currentCMSMenuItemName" from-scope="user"/>
<set field="headerItem" value="CMS"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="cms" location="component://content/widget/cms/CMSMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonContentDecorator">
<section>
<actions>
<set field="headerItem" value="Content"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="content" location="component://content/widget/content/ContentMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<container>
<include-menu name="contentSub" location="component://content/widget/content/ContentMenus.xml"/>
</container>
<section>
<condition>
<not><if-empty field="currentValue.contentId"/></not>
</condition>
<widgets>
<label style="h1" text="${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${currentValue.contentName},${currentValue.description} [${currentValue.contentId}] ${${extraFunctionName}}"/>
</widgets>
<fail-widgets>
<label style="h1" text="${uiLabelMap.PageTitleAddContent}"/>
</fail-widgets>
</section>
<container style="no-clear">
<decorator-section-include name="body"/>
</container>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="contentDecorator">
<section>
<actions>
<set field="headerItem" value="Content"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="contentTopMenu" location="component://content/widget/content/ContentMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<container style="no-clear">
<decorator-section-include name="body"/>
</container>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonDataResourceDecorator">
<section>
<actions>
<set field="headerItem" value="DataResource"/>
<set field="currentContentMenuItemName" from-field="currentContentMenuItemName" from-scope="user"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="dataresourceTopMenu" location="component://content/widget/content/DataResourceMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<section>
<condition>
<not><if-empty field="currentValue.dataResourceId"/></not>
</condition>
<widgets>
<include-menu name="dataresource" location="component://content/widget/content/DataResourceMenus.xml"/>
<label style="h1" text="${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${currentValue.dataResourceName} [${currentValue.dataResourceId}] ${${extraFunctionName}}"/>
</widgets>
</section>
<container style="no-clear">
<decorator-section-include name="body"/>
</container>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonCompDocDecorator">
<section>
<actions>
<set field="headerItem" value="CompDoc"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="${menuName}" location="component://content/widget/compdoc/CompDocMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<label text="${title}" style="h1"/>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonContentSetupDecorator">
<section>
<actions>
<set field="currentMenuItemName" from-field="currentMenuItemName" from-scope="user"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://content/widget/CommonScreens.xml">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="contentsetup" location="component://content/widget/contentsetup/ContentSetupMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonDataResourceSetupDecorator">
<section>
<actions>
<set field="tabButtonItem" from-field="tabButtonItem" from-scope="user"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://content/widget/CommonScreens.xml">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="dataresourcesetup" location="component://content/widget/datasetup/DataResourceSetupMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonWebSiteDecorator">
<section>
<actions>
<set field="headerItem" value="websites"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://content/widget/CommonScreens.xml">
<decorator-section name="pre-body">
<section>
<condition>
<and>
<if-has-permission permission="CONTENTMGR" action="_VIEW"/>
<not><if-empty field="parameters.webSiteId"/></not>
</and>
</condition>
<widgets>
<include-menu name="website" location="component://content/widget/content/ContentMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_VIEW"/>
</condition>
<widgets>
<!--<container style="button-bar">
<link text="${uiLabelMap.ContentCreateNewWebSite}" target="EditWebSite" style="buttontext create"/>
</container>-->
<container>
<include-menu name="websiteMenu" location="component://content/widget/content/ContentMenus.xml"/>
</container>
<label style="h1" text="${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${webSite.siteName} [${webSite.webSiteId}] ${${extraFunctionName}}"/>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="commonLayoutDecorator">
<section>
<actions>
<set field="tabButtonItem" from-field="tabButtonItem" from-scope="user"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="component://content/widget/CommonScreens.xml">
<decorator-section name="pre-body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<include-menu name="layout" location="component://content/widget/layout/LayoutMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_UPDATE"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentUpdatePermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="main">
<section>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.ContentMain}">
<container><label text="${uiLabelMap.ContentWelcome}"/></container>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="responseTreeLine">
<section>
<actions>
<service service-name="getContentAndDataResource" result-map="contentData">
<field-map field-name="contentId" from-field="rsp.contentId"/>
</service>
<set field="textData" from-field="contentData.resultData.electronicText.textData"/>
</actions>
<widgets>
<section>
<condition>
<if-compare-field field="responseContentId" operator="equals" to-field="rsp.contentId"/>
</condition>
<widgets>
<container style="responseSelected">
<label text="${rsp.contentName} - ${rsp.description} [${rsp.contentId}]" style="responseheader"/>
<link text="${uiLabelMap.PartyReply}" target="addForumThreadMessage" style="buttontext">
<parameter param-name="forumGroupId" from-field="parameters.forumGroupId"/>
<parameter param-name="forumId" from-field="parameters.forumId"/>
<parameter param-name="forumMessageIdTo" from-field="rsp.contentId"/>
<parameter param-name="contentAssocTypeId" value="RESPONSE"/>
</link>
<container style="responsetext">
<include-form name="EditForumThreadMessage" location="component://content/widget/forum/ForumForms.xml"/>
</container>
</container>
</widgets>
<fail-widgets>
<container>
<label text="${rsp.contentName} - ${rsp.description} [${rsp.contentId}]" style="responseheader"/>
<link text="${uiLabelMap.PartyReply}" target="addForumThreadMessage" style="buttontext">
<parameter param-name="forumGroupId" from-field="parameters.forumGroupId"/>
<parameter param-name="forumId" from-field="parameters.forumId"/>
<parameter param-name="forumMessageIdTo" from-field="rsp.contentId"/>
<parameter param-name="contentAssocTypeId" value="RESPONSE"/>
</link>
<container style="responsetext">
<include-form name="EditForumThreadMessage" location="component://content/widget/forum/ForumForms.xml"/>
</container>
</container>
</fail-widgets>
</section>
</widgets>
</section>
</screen>
<screen name="fonts.fo">
<section>
<widgets>
<platform-specific>
<xsl-fo><html-template location="component://content/webapp/content/fonts.fo.ftl"/></xsl-fo>
</platform-specific>
</widgets>
</section>
</screen>
<screen name="CommonWebAnalyticsDecorator">
<section>
<actions>
<set field="headerItem" value="websites"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<section>
<condition>
<and>
<if-has-permission permission="CONTENTMGR" action="_VIEW"/>
<not><if-empty field="parameters.webSiteId"/></not>
</and>
</condition>
<widgets>
<include-menu name="website" location="component://content/widget/content/ContentMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<widgets>
<container style="button-bar">
<include-menu name="WebAnalyticsConfigButtonBar" location="component://content/widget/content/ContentMenus.xml"/>
</container>
<label style="h1" text="${uiLabelMap.CatalogWebAnalytics} ${uiLabelMap.CommonFor} : ${webSite.siteName} [${webSite.webSiteId}] ${${extraFunctionName}}"/>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>