docs.intersystems.com
Home / Security Tutorial / Code for Privileged Routine Example

Security Tutorial
Code for Privileged Routine Example
[Back]          
InterSystems: The power behind what matters   
Search:  


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
}

}




[Back]          
  |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-04-23 15:16:11