mikelear@cityindex.co.uk Hi guys I have a more general question about the Meta Data Adapter. I have a load of adapters which any user who is a valid customer can see. This works fine as I check the user is a valid system user in notifyUser (he passes a session he has got from our system) once he is through this check he can see any items he subscribes to. However what if I want users to only be able to see certain items in a data adapter. Basically if you have a Data adapter that provides user P&L and you want each use to only be able to see their P&L so ITEM = PNL.12345 for user 12345 where do you put this authentication. It has to be in Meta Data Adapter but I can't see anywhere obvious that passes a user , session and the actual Item they want to see. Thanks Mike
Mone Hi Mike, I think that the getItems method is what you need, please take a look and let me know if this is not suitable for your needs. HTH
mikelear@cityindex.co.uk Hi Thanks for you're reply. I don't think the getItems is the correct method to use. I do use this method so users can pass groups like wathlist that get transformed to list of items butI don't think this is the correct usgae for my problem. I think I will end up suing the isModeAllowed and just ignore the passed Mode parameter. This seems to be the only obvious method to use where I obtain the User and Item. Thanks Mike
Dario Crivelli If your purpose is to check that the item names supplied in the subscription requests are consistent with the user visibility rules, the callback to use is notifyNewTables. It is invoked after getItems and includes all subscription attributes; it lets you return an exception if the whole request is not acceptable. Note that the method has a couple of caveats: One is that wantsTablesNotificationhas to be implemented to return true in order to enable the invocation to notifyNewTables . The other is that the method is invoked with the "group id" (that is, the input of the previous invocation to getItems, not the output), which, in some cases may be a hassle. However, for similar cases, we suggest trying to leverage the flexibility offered by getItems: If the P&L were unique for each user, a user could request just PNL and getItems could change that into PNL.12345 based on the knowledge of the involved user. In that case, any request for PNL.12345 should simply be refused with an ItemsException as syntactically wrong.