Mike Fechner
375 posts
Registered:
14 Sep 2016
22 Jul 2020
in reply to
Roger Blanchard
Link to this post
Well, I try to avoid scenarios where I care about in which application a user is allowed to do what.
Why? Because that means that when you add a new UI for a future use case, or provide that data to another application with a service, I would always have to revisit all business logic and think about from which UI I want to support what. I don't want to change completed business logic ever again.
If a user is allowed to update a field, they should be allowed to do that from any device.
If you are worried about data consistency, that should be taken care of by validation.
If the update is o.k. from your trusted GUI it should be o.k. from any other device too. Nobody can stop a "bad guy" from getting access to an OpenEdge Class Room Edition and write code talking to your Business Logic through AppServer calls to your business logic. So authentication and authorization on the Backend are the only line of defense.
If now you add restriction for the current web or mobile application into the interface, you might have to lift those restriction when you want to use that same interface for a different application that needs more data.
So generally, we solve users field level authorization through an IFieldAuthorizationProvider implementation (yours or ours).
If this does not convince you, I believe the SESSION:CURRENT-REQUEST-INFO instance should tell you which web handler was used to invoke something on the backend. I haven't looked into that in a while.
But we don't have any form of authorization in the framework out of the box that is dependent on the client or service interface used.