Results 1 to 6 of 6

Thread: User access to subsets of data

  1. #1
    Join Date
    Jun 2005
    Location
    Manchester,UK
    Posts
    13

    Default User access to subsets of data

    Hi

    The system I am currently developing has a core requirement that different users will have access to different subsets of data. For instance, in the UK a user may only access UK data but a manager from Italy may have access to both UK and Italian data. I could naturally determine this through SQL but it seems clumsy plus on every SQL statement I would need to remember to filter by country dependent on user. Does anyone have any ideas how to acheive this in a more fluid way?

    Best

    DF

  2. #2

    Default

    which database are you using?

  3. #3
    Join Date
    Jun 2005
    Location
    Manchester,UK
    Posts
    13

    Default

    mySQL version 5.

    DF

  4. #4

    Default

    shame, because if it was Oracle, i could have told you about their solution to this problem.

    For what its worth, i do think the logic to filter the rows should go in the db.

    Rakesh

  5. #5
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    It depends on what access tool are you using - Hibernate for example has filters which take care of exactly your problem. they basically restrict the queries based on your conditions.
    You'll probably have to do the same thing.

    P.S. Not sure how good mysql 5 is, but you might want to take a look at the 'views' support.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  6. #6
    Join Date
    Jun 2010
    Posts
    22

    Default

    Hi!

    I know this an old thread, but I have the same problem.

    I want different users to access different data. In my case it is not country dependend. User create their own data and as long as auser does not grant access to his data only he can work with the data.

    Could you please tell me how that feature is called in hibernate?
    What is the way to handle this cases in spring3? Should I still use hibernate for user-data management?

    Maybe not the right thread, but how would I load data with a persistence api at login time, not at startup time of the server?

    Thanks
    Dominik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •