Datasnap.DSSession.TDSSession.UserRoles
Delphi
property UserRoles: TStrings read FUserRoles;
C++
__property System::Classes::TStrings* UserRoles = {read=FUserRoles};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Datasnap.DSSession.pas Datasnap.DSSession.hpp |
Datasnap.DSSession | TDSSession |
Description
Allows the user to associate specific users to other roles.
UserRoles is used to associate specific users to other roles by adding them to the list of strings specified by UserRoles.
For example, a group of users may be called TestUsers. Usually, every server method call results in a call to the authorization event to make sure the user role is allowed. In this particular example, any server method or class that has defined roles of TestUsers would not require to use the authorization event at all.
[TRoleAuth('TestUsers,ClassLevelAllow1,ClassLevelAllow2', 'ClassDeny1')]
TServerMethods1 = class(TDSServerModule)
private
{ Private declarations }
public
{ Public declarations }
[TRoleAuth('TestUser1,TestUser2,TestUser3', 'AttDeny')] { overrides the class level attribute }
function EchoString(Value: string): string;
function ReverseString(Value: string): string;
end;