Allow (element)

From JRapid

Jump to: navigation, search

The <allow> element is defined inside the <restrict> element to register a user privilege which will be allowed to execute an associated action (like read, remove, etc).


   <allow action="SAVE|ADD|LIST|REMOVE" privilege="PRIVILIGE_NAME"/>
   <allow ... />
  • action: the name of the action
  • privilege: the name of the associated privilege defined in the "Priviliges" enumset


  • Adding a "SAVE" restriction to a entity:

A company can be saved only by users which have the "CS" privilege.

<entity label="Company" name="Company">
            <allow action="SAVE" privilege="CS"/>
            <allow action="READ" privilege="ANONYMOUS"/>
            <allow action="LIST" privilege="ANONYMOUS"/>
            <allow action="REMOVE" privilege="ANONYMOUS"/>

The privileges enumset:

<enumset name="Privileges" privileges="privileges">
        <enum value="CS">companySave</enum>
        <enum value="CR">companyRead</enum>
        <enum value="CL">companyList</enum>
        <enum value="CRR">companyRemove</enum>
        <enum value="US">userSave</enum>
        <enum value="UR">userRead</enum>
        <enum value="UL">userList</enum>
        <enum value="URR">userRemove</enum>

See also

Personal tools