Handling user security scope with nHibernate or other ORM
Posted
by Schotime
on Stack Overflow
See other posts from Stack Overflow
or by Schotime
Published on 2010-06-05T06:56:45Z
Indexed on
2010/06/05
7:02 UTC
Read the original article
Hit count: 256
How should one handle the situation where you may need to filter by a group of users. Here is the scenario.
I have an administrator role in my company. I should be able to see all the data belonging to me plus all the other users who I have control over.
A plain old user however should only be able to access their own data.
If you are writing regular sql statements then you can have a security table with every user and who they have access too but i'm not sure how to handle this situation in the OO and ORM world.
Any one dealt with this scenario in a web application using an ORM? Would love to hear your thoughts!
© Stack Overflow or respective owner