unit ServerMethodsUnit1;
interface
uses
  System.SysUtils, System.Classes, Datasnap.DSServer, Datasnap.DSAuth;

type
  [TRoleAuth('client', 'dummy')]
  TMyServerMethods = class(TDSServerModule)
  private
    { Private declarations }
  public
    { Public declarations }
    function EchoString(Value: string): string;
    [TRoleAuth('admin', 'guest')]
    function ReverseString(Value: string): string;
  end;

implementation

{$R *.dfm}

uses System.StrUtils;

function TMyServerMethods.EchoString(Value: string): string;
begin
  Result := Value;
end;

function TMyServerMethods.ReverseString(Value: string): string;
begin
  Result := System.StrUtils.ReverseString(Value);
end;

end.

