Custom Permissions
From: Chris Blanco (cblancoNOSPAM@necam.com)
Date: 03/31/03
- Next message: MS News: "Re: Microsoft Certificate Services"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Chris Blanco" <cblancoNOSPAM@necam.com> Date: Mon, 31 Mar 2003 09:25:58 -0500
Does anyone have any information on creating custom permissions and
permission attributes other than the MSDN articles. Information on this
topic is Sparse to say the least.
Here is a quick summary of what I wish to accomplish:
I am developing a custom Principal and Identity for a large Application. It
is going to be used to drill a little further down than roles, so that I can
limit parts of my code to certain access rights (In my design, roles are
made up from a bunch of rights. The rights are defined by me, but can be
moved and deleted from role to role by the end user, so I need something
very flexible). My custom Identity holds all the specific access rights and
roles a user has, so I will be able to check the Threads current principal
to find an access right. I have the Principal and Identity up and running,
but I am having trouble developing an attribute similar to [SecurityRole] or
[PrincipalPermission] that will take an access right instead of a Role.
For example I would like to do something like this.
[NeedsRight("SFCEdit")]
bool ChangeSFC(string strSFc)
{...}
Where if the user does not have the right specified by NeedsRight I will be
able to prevent him from entering that function. How does this work? I know
how to write a custom attribute I just don't know how to prevent the user
from entering that code block. Any pointing in the right direction would be
appreciated greatly!
- Next message: MS News: "Re: Microsoft Certificate Services"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|