IRORolesAwareService

Overview

The IRORolesAwareService interface is used by the TROInvoker class for the validation of roles inside services.

This interface is supported by the TRORemoteDataModule class.

The following example demonstrates the usage of this interface:

procedure TROInvoker.CheckRoles(anInstance: IInterface;
  aRoles: array of String);
var
  aService: IRORolesAwareService;
begin
  if Length(aRoles) = 0 then exit;
  if not Supports(anInstance, IRORolesAwareService, aService) then
    raise SessionDoesNotHaveRequiredRolesException.Create
      (Err_SessionDoesNotHaveAllRequiredRoles);
  aService.ServiceValidateRoles(aRoles);
end;

Location


Required Methods


ServiceValidateRoles

Validates roles.

procedure ServiceValidateRoles(aRequiredRoles: array of string)

Parameters:

  • aRequiredRoles: Roles