I am developing a kind of CRM system that needs to have a data-bas*ed security mechanism more then role-based security mechanism.
For example, a certain user in the system can view
all clients, update
his own clients.
So, a role based security wont help here because all the sales guys has the same role: sales_user_role
.
I need to differentiate them by having a field in every client row: sales_owner_id
if(client.salesOwnerId.Equales(httpSession["user_id"]){
delete...
update...
}
in the above case the client
object is the client entity that has a salesOwnerId.
Since the above is spaghetti code, I would like to do it in a data-driven security frame work.
I am working with c# .NET4, MVC3, WCF, Nhibernate and Spring for Dependency injection.
(I saw rhino security that do that, but it is not documented and has very few learning resources)
Thanks