Skip to main content
Previous sectionNext section

Code for Privileged Routine Example

Here is the code for the privileged routine example. Create the class using Atelier.

Class SecurityTutorial.PrivilegedRoutineExample
{

ClassMethod PrivilegedRoutineEx(){

    Write !, "Welcome to the Privileged App Routine"
    Write !, "User before: ", $USERNAME
    Write !, "Roles before: ", $ROLES

    Set status=$System.Security.AddRoles("MyPrivilegedRoutineApplication")

    Write !, "User after: ", $USERNAME
    Write !, "Roles after: ", $ROLES
}

}


Copy code to clipboard