Datasnap.DSAuth.TDSCustomAuthenticationManager.CompareRoles

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Datasnap.DSAuth.pas
Datasnap.DSAuth.hpp
Unit: Datasnap.DSAuth
Parent: TDSCustomAuthenticationManager

Delphi

class function CompareRoles(UserRoles: TStrings;
AuthorizedRoles, DeniedRoles: TStrings): TDSRoleComparison;

C++

__classmethod TDSRoleComparison __fastcall CompareRoles(System::Classes::TStrings* UserRoles, System::Classes::TStrings* AuthorizedRoles, System::Classes::TStrings* DeniedRoles);

Description

Helper function for doing default authorization check.

CompareRoles is a helper function that can be used by implementations of the OnUserAuthorize event to help determine whether authorization should be given or not. It compares the roles assigned to the current user with the authorized and denied roles of the server method being invoked. The possible outcomes of this are explained by TDSRoleComparison.