28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

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.

Caution: Theoretically, a user with authorization to model and activate repository objects can change<br />

a role that he has been granted. Once the role is activated, the user has the new privileges that he or<br />

she just added. Therefore, it is important that roles in productive systems are imported from a test or<br />

development system and changes to imported objects are not allowed. This danger is however not<br />

specific to roles but also applies to other repository objects, for example, modeled views.<br />

● You have granted privileges on non-activated runtime objects that you want to grant in the new role to the<br />

technical user _SYS_REPO.<br />

The following general conventions apply when modeling a role definition using the role DSL:<br />

● Comments start with a double-slash (//) or double-dash (--) and run to the end of the line.<br />

● When specifying a reference to a design-time object, you must always specify the package name as follows:<br />

○ package::object if you are referencing a design-time role<br />

○ package:object.extension if you are referencing any other design-time object<br />

● When specifying multiple privileges on the same object or the same privilege on multiple objects, you can do<br />

so individually line by line, or you can group them on a single line. Separate multiple objects and/or multiple<br />

privileges using a comma.<br />

1. From the main menu in the <strong>SAP</strong> <strong>HANA</strong> studio, choose File New Other <strong>SAP</strong> <strong>HANA</strong> Repository Role<br />

.<br />

The New Role dialog box appears.<br />

2. In the Container field, enter the path to the package where you want to create the role.<br />

3. In the Role name field, enter the name of the new role.<br />

4. Choose Finish.<br />

The new role appears in the Project Explorer view and opens in the role editor as follows:<br />

// an empty role<br />

role :: {<br />

}<br />

The role is now ready to be defined.<br />

5. Optional: Specify the role(s) that you want to embed within the new role.<br />

You can specify both roles created in runtime and repository roles as follows:<br />

○ extends role ::<br />

○ extends catalog role "role_name"<br />

Example:<br />

role ::<br />

extends role sap.example::role1<br />

extends catalog role "CATROLE2"<br />

{<br />

}<br />

6. Model the required privileges.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up Roles and Authorizations<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 325

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

Saved successfully!

Ooh no, something went wrong!