Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Feb 2009
    Location
    London
    Posts
    2

    How to limit the items a user can see

    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

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    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

  3. #3
    Member
    Join Date
    Feb 2009
    Location
    London
    Posts
    2
    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

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    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 wantsTablesNotification has 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.

 

 

Similar Threads

  1. Websockets message throughput limit?
    By ReVaN01 in forum General
    Replies: 9
    Last Post: May 30th, 2012, 10:40 PM
  2. Streaming connections limit
    By Rakot in forum General
    Replies: 1
    Last Post: May 14th, 2010, 12:06 PM
  3. How can I limit the log file size ?
    By GoatHunter in forum General
    Replies: 2
    Last Post: August 25th, 2009, 11:54 AM
  4. Maximum limit of rows & coluns in a table
    By indrajit in forum Client SDKs
    Replies: 1
    Last Post: February 22nd, 2008, 09:41 AM
  5. Replies: 1
    Last Post: June 4th, 2007, 09:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 08:17 AM.