14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.4. Conditionally Enabling Insert, Update an Delete<br />

The previous sections explained how to enable or disable insert, update and delete<br />

functionally for the group, regardless of user roles and permissions or the actual data.<br />

To conditionally enable insert, update and delete operations you can use the Insert<br />

Allowed EL Expression, Update Allowed EL Expression and Delete Allowed EL<br />

Expression. These properties are available both on the Service-level and on Group level.<br />

On service-level, you will typically use them in combination with permission-based<br />

access control. See chapter 10 “Application Security”, section 10.7 “Restricting Group<br />

And Item Operations based on Authorization Information” for more information.<br />

On the group level you can refer to user roles, and you can make the operation enabled<br />

based on the actual data shown on the page.<br />

For example, if you have a business rule which specifies that users in the<br />

HR_ASSSISTANT role can only delete job PU_CLERK and that HR_MANAGERS can<br />

delete all jobs, then you can specify the following DeleteAllowed EL Expression to<br />

implement this rule:<br />

#{jhsUserRoles[‘HR_MANAGERS’] or (jhsUserRoles[‘HR_ASSISTANT’] and<br />

bindings.JobsJobId.inputValue==’PU_CLERK’)}<br />

users can only delete jobs where the Delete button in the Edit Jobs page should only be<br />

available when the Job Id is<br />

8- 6 Generating Transactional Behaviors <strong>JHeadstart</strong> Developer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!