Thursday, October 2, 2008

Exciting Day At Work

Implementing permissions in the application.The database structure is there. There is "Permissions" table, there is "Roles" table, there is "RolesPermissions" table. There is an interface that allows to create additional roles and add different permissions to them. So, what is the exciting thing that's not yet implemented?

I have to go through the code and insert pieces of code that actually check user's permissions and look like this:

if (CurrentUser.IsAllowed(Permissions.MyPermissionToSeeSomeHighlySensitiveData))
{
//existing code remains here
}
else
{
MessageBox("GoAway", "You have no permission to do that");
}

There are about 130 separate permissions and about 190 places in the application where permissions are checked ... what an exciting way to spend Friday.

by Evgeny

No comments: