Refactored Example Application to use new security mechanics - JIRA OFBIZ-2392
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@770084 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -71,7 +71,7 @@ under the License.
|
||||
<section>
|
||||
<condition>
|
||||
<and>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
<not><if-empty field="example"/></not>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -82,9 +82,9 @@ under the License.
|
||||
</decorator-section>
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<!-- do check for EXAMPLE, _VIEW permission -->
|
||||
<!-- do check for access:example permission -->
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<section>
|
||||
@@ -135,7 +135,7 @@ under the License.
|
||||
<section>
|
||||
<condition>
|
||||
<and>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
<not><if-empty field="exampleFeature"/></not>
|
||||
</and>
|
||||
</condition>
|
||||
@@ -148,7 +148,7 @@ under the License.
|
||||
<section>
|
||||
<!-- do check for EXAMPLE, _VIEW permission -->
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<section>
|
||||
|
||||
@@ -34,7 +34,7 @@ under the License.
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<container style="h1"><label>${uiLabelMap[titleProperty]}</label></container>
|
||||
@@ -68,7 +68,7 @@ under the License.
|
||||
<screen name="ListExampleFormOnly">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<actions>
|
||||
<!-- NOTE: these are needed because this may be run as a top level screen and would have no decorator -->
|
||||
@@ -84,7 +84,7 @@ under the License.
|
||||
<screen name="CreateExampleFormOnly">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<actions>
|
||||
<!-- these are only needed so that when bsh evaluates use-when attributes these will exist and not cause an error -->
|
||||
|
||||
@@ -34,7 +34,7 @@ under the License.
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
||||
@@ -98,7 +98,7 @@ under the License.
|
||||
<screen name="LookupExampleFeature">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<actions>
|
||||
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
|
||||
|
||||
@@ -142,6 +142,8 @@ under the License.
|
||||
<field name="displayAnotherText" use-when="example!=null&&example.get("anotherText")!=null">
|
||||
<display description="${example.anotherText}"/>
|
||||
</field>
|
||||
<field name="createdByUser" use-when="example==null"><hidden value="${userLogin.userLoginId}"/></field>
|
||||
<field name="createdByUser" use-when="example!=null"><hidden/></field>
|
||||
<field name="submitButton" use-when="example==null" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
|
||||
<field name="submitButton" use-when="example!=null" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
|
||||
</form>
|
||||
|
||||
@@ -34,7 +34,7 @@ under the License.
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
||||
|
||||
@@ -31,7 +31,7 @@ under the License.
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<if-has-permission permission="access:example"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<container style="h1"><label>${uiLabelMap.PageTitleFormWidgetExamples}</label></container>
|
||||
|
||||
Reference in New Issue
Block a user