I have several service methods in a TRORemoteDataModule and am capturing RORemoteDataModuleActivate event verifying each name in order to allow or disallow an execution.
Is there a best way to reject an execution? I was thinking in generating an exception but don’t know if I can with this method return any information to client.
Hi
Because the rules are not fixed based on each user.
Imagine you have a server that could handle only 30 concurrent users of a finance module, 20 concurrent users for sales module, etc.
Each module has several methods, so, I could classify each incoming request based on the method name and see if that user is allowed or not to run in that server. This is the point I am now. So, my question is: how can I refuse (in a gentle way, if that exists…) that execution so the client exe could show something meaningful for the user? I could just throw an exception at RORemoteDataModuleActivate event but this is a best practice here?
I think, you can do this a bit easier:
you can control during a login how many concurrent users are logged into each module and disallow to login into selected module if the quota is exceeded.
in login method you can assign correspondent role: finance_role, sales _role, etc. it will allow to reject execute methods of sales module if user was connected to finance module.