Files
ofbiz-framework/framework
Adrian Crum 0dbdf4a204 Create a new permission checking service to make permission handling easier. The new service returns Boolean values for all CRUD + View permissions - avoiding the need to do multiple permission service calls.
The main purpose of the service is to control multiple screen elements with a single service call. This reduces screen widget and template code. Example:

<screen name="GetMyAppPermissions">
  <!-- This screen must be included before any decorators -->
  <section>
    <actions>
      <service service-name="commonGetAllCrudPermissions" result-map="result">
        <field-map field-name="primaryPermission" value="MYAPP"/>
        <field-map field-name="altPermission" value="MYAPP_ALT"/>
      </service>
      <set field="hasCreatePermission" from-field="result.hasCreatePermission" type="Boolean" global="true"/>
      <set field="hasUpdatePermission" from-field="result.hasUpdatePermission" type="Boolean" global="true"/>
      <set field="hasDeletePermission" from-field="result.hasDeletePermission" type="Boolean" global="true"/>
      <set field="hasViewPermission" from-field="result.hasViewPermission" type="Boolean" global="true"/>
    </actions>
    <widgets/>
  </section>
</screen>

<screen name="MainScreen">
  <section>
    <actions>
      <set field="titleProperty" value="MyAppMainScreen"/>
    </actions>
    <widgets>
      <include-screen name="GetMyAppPermissions"/>
      <!-- screen elements controlled by has*Permission field values -->
      ...
    </widgets>
  </section>
</screen>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1054161 13f79535-47bb-0310-9956-ffa450edef68
2010-12-31 19:11:59 +00:00
..
2010-12-26 14:28:16 +00:00
2010-12-26 14:28:16 +00:00
2010-12-12 21:31:27 +00:00
2010-12-26 14:28:16 +00:00
2010-12-12 21:31:27 +00:00
2010-12-12 21:31:27 +00:00
2010-12-12 21:31:27 +00:00
2010-12-26 14:28:16 +00:00
2010-12-12 21:31:27 +00:00
2010-12-12 20:43:03 +00:00
2010-12-12 21:31:27 +00:00
2010-12-30 17:07:47 +00:00