Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Restrict properties/method calls to particular users



Am 06.12.2016 um 16:01 schrieb Kevin Herron:
is it possible to restrict the retrieval of properties/variables to specific users?

The recently implemented AttributeDelegate concept makes this pretty easy. There's
 even an example of this use case. See
 https://github.com/eclipse/milo/blob/master/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/RestrictedAccessDelegate.java and its use here: https://github.com/eclipse/milo/blob/master/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/ExampleNamespace.java#L265-L298

OK, so I should download the current version ;-)

Same for methods being called? How can I check the requesting user within a method-call?

This seems to be a bit of an oversight. I'll have to augment the invocation handler stuff
 to include the Session that is calling. For now, you would have to override
 Namespace#call (MethodServices#call) where you get an CallContext which can be used to
 access the Session.

I'm not in a hurry. So if you see that as an oversight (i.e. bug ;-) I can wait for
a future release that allows access to that information in an easier (and standard) way.


Thanks and cheers, Lothar


Back to the top