RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMtsAutoObject.IsCallerInRole Method

Indicates whether the current client matches a particular security role.

Pascal
function IsCallerInRole(const Role: WideString): Bool;
C++
__fastcall Bool IsCallerInRole(const BSTR Role);

MTS provides role-based security. Each level of access to your application server can be assigned a role. Using the MTS Explorer, administrators can prevent clients from using an interface based on their role. (This is called declarative security.) In addition, however, programs can provide more fine-grained security programmatically. To do this, use IsCallerInRole to provide access to blocks of code based on the caller's security role. 

IsCallerInRole checks whether the current client is part of the role named by the Role parameter. It returns true if the client matches the named role, and False otherwise. Use IsCallerInRole to prevent clients from invoking certain blocks of code if they do not have the appropriate security role.

Note: MTS security is not available on servers running Windows95. If the MTS application is running on Windows95, IsCallerInRole always returns true . In addition, IsCallerInRole always returns True if the application is part of an MTS Library package (which runs in the client's process space).
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!