Click here to Skip to main content
15,887,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends,

I am working on a complex Asp.net MVC 4 application where I have to manage role and permissions from database. I have a screen where I can select an action and allow that to role. I can do same thing on several modules. Now I have an issue that there are some other actions which are not listed in main actions table (a table in database where I have added most of the actions like Index, Edit, Details, Delete etc). So whenever a new action/function is added to controller which I need to access via ajax call, I have to add that in table which I dont want to, because that is a helper kind of method.

I have created a BaseController in which I am checking the permissions based on roleid, action name and module name. The base controller does not allow any method which is not added to actions table and has not permission associated with that. Is there any way I can allow other methods without checking in base controller or the base controller should know that this is a kind of helper method just like Childaction.

Please suggest.

Thanks,
Jagjot
Posted

 
Share this answer
 
Comments
Jagjot Singh 11-Jul-13 7:18am    
Sure, I'll have a look into that. Thanks!!
I modified some permissions stuff and checked only required actions in backend rather than checking all actions. If fixed the issue I was having.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900