-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Restrict User Permissions to the Property of an Entity
PostPosted: Mon Jan 16, 2012 11:14 am 
Newbie

Joined: Thu Oct 15, 2009 5:56 am
Posts: 2
I’m thinking of developing a new application using nHibernate. I want to be able to restrict permissions to an Entity down to the Property level and I want this to be configurable.

So for example say I had a Employee entity with Name, Position and Salary properties:
• Admin users can View\Edit all properties of an Employee object.
• Custom user can View\Edit Name, Position but not view\edit Salary.
• ViewOnly user can only view Employee object.

I want these permissions to be configurable by the application user so I’m building a Entity\Permissions model in my database. Then when I display a specific Entity I ask HasPermission() for every property before I display it on screen. I guess this seems like overkill and quite an overhead so...

Is this the correct approach?
Are there any tools or existing frameworks that will allow me to do this easily?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.