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.

10.7. Restricting Group And Item Operations based on Authorization Information<br />

In addition to restriction group access, you can also restrict the operations based on<br />

authorization information. To do this for individual groups, use the<br />

Insert/Update/Delete Allowed EL Expression properties on group level.<br />

In the above example, both the HR_MANAGER and HR_ASSISTANT roles can access<br />

the Employee group pages. The HR_MANAGER can insert, update and delete employee<br />

information; the HR_ASSISTANT can only update existing employees.<br />

10.7.1. Restricting Group Operations using Permissions<br />

As explained in section Restricting Group Access using Permissions <strong>JHeadstart</strong> can<br />

generate a SQL script that inserts operation permissions in the JHS_PERMISSIONS table<br />

for each group. These operation permissions are named after the group, suffixed with<br />

“.Create” “.Update” and “.Delete. For example, for the Jobs group the following<br />

permissions are created:<br />

• The “Jobs.Create” permission determines whether the “New Job” button is<br />

rendered.<br />

• The “Jobs.Update” permission determines how the items on the Edit Job page<br />

will be rendered: as read only when the user does not have a role with this<br />

permission, or as updateable when the user does have this permission.<br />

• The “Jobs.Delete” permission determines whether the “Delete Job” button is<br />

rendered<br />

Now, you can use these permissions rather than role names to restrict the create, update<br />

and delete operations. And you can configure this at service-level, which saves you the<br />

work of entering the Insert Allowed, Update Allowed and Delete Allowed EL<br />

expressions for each and every group. The same properties exist at service level, and you<br />

can use the $GROUP_NAME$ token which will be replaced with the actual group name<br />

when generating the pages for each group.<br />

10 - 24 Application Security <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!