Datasnap.Win.MtsRdm.TMtsDataModule.IsCallerInRole

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsCallerInRole(const Role: WideString): Boolean;

C++

bool __fastcall IsCallerInRole(const System::WideString Role);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Win.MtsRdm.pas
Datasnap.Win.MtsRdm.hpp
Datasnap.Win.MtsRdm TMtsDataModule

Description

Indicates whether the current client fits into a particular security role.

MTS provides role-based security. Each level of access to the application server can be assigned a name, called a role. Using the MTS Explorer or COM+ administrator, 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 fits the named role, and false otherwise. Use IsCallerInRole to prevent clients that do not have the appropriate security roles from invoking certain blocks of code.

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

See Also