Skip to main content

Example Setup

The following example demonstrates creating and testing a privileged routine application. Before beginning the example, you must complete the following preliminary steps. Note that you may well have completed the first three steps for an earlier example in this tutorial.

  1. If you have not already done so, add a user (user name is JSmith, password is JSmith) to InterSystems IRIS. Read Creating a User for instructions.

  2. If you have not already done so, add a resource (SecurityTutorialResource) to InterSystems IRIS. Read Creating a Resource for instructions.

  3. If you have not already done so, create a role (SecurityTutorialRole). Add the SecurityTutorialResource to the role with Use permissions. Read Creating A Role for instructions.

  4. Create another new role named PrivRoutineRole. Read Creating A Role for instructions.

  5. Add the user JSmith to the %Developer role, but not the SecurityTutorialRole. If JSmith is already a member of SecurityTutorialRole, remove JSmith from the role. Read Adding a User to a Role for instructions. Note that the instructions show adding the user to the SecurityTutorialRole role. In this case you want to add the user to %Developer.

  6. Finally, create the class SecurityTutorial.PrivilegedRoutineExample, in the USER namespace. See Code for Privileged Routine Example for instructions.

Note:

For this example the user JSmith must have the %Developer role. We need JSmith to have access to the Terminal. This requires membership in %Developer.

FeedbackOpens in a new window