roles and permissions

Posts   
 
    
superman
User
Posts: 11
Joined: 06-Jun-2006
# Posted on: 06-Jun-2006 18:54:16   

I'm taking over a asp.net project. There is both a website and a webservice.

I'm migrating over to LLBLGen from stored procs.

The problem is, every stored proc first checks the permissions of the user to make sure they can peform the action. It seems like a bad approach to have permission checking this late in the game. But the one advantage is that the permission is hardcoded in the stored proc and not the C# code which makes it easier to change. There is a permissions table with a m:n relationship with roles.

Basically, I have a really tight deadline and here's my only idea for solving this is to hardcode the permissions into an enum in c#, then, check the permissions against the database. But, I don't like that then the permissions are hardcoded.

Anyone have any suggestions?