Declarative Role-Based Security
From: Greg Bacchus (FBRAJGOPLBRF@spammotel.com)
Date: 02/24/03
- Next message: Dominic Caffey: "web.config in subdirectory security problem..."
- Previous message: AD: "Building Secure ASP.NET Applications"
- Next in thread: Joe Kaplan: "Re: Declarative Role-Based Security"
- Reply: Joe Kaplan: "Re: Declarative Role-Based Security"
- Reply: Jose Lema: "Declarative Role-Based Security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Greg Bacchus" <FBRAJGOPLBRF@spammotel.com> Date: Tue, 25 Feb 2003 09:55:07 +1300
What I want to do is have context sensitive menus that are based on modules
loaded and current user permissions. Of course the obvious thoughts was to
go for declarative security using the PrincipalPermissionAttribute. Which is
nice, but there is no way to find out whether the current context has
permission to access the class or method without actually creating the class
and running the method (or at least from what I can see).
What I need is a "MemberInfo.CanAccess" or something like that! How do I go
about what I am trying to do?
I also thought of trying to override the CodeAccessSecurityAttribute but I
get the following error on build. So no joy there either.
Following is the error. The class that overrode the
CodeAccessSecurityAttribute was called "SecurityAllow" for want of a better
name and located in a module baled Base.dll. This error occurs in the
modules that try to use the SecurityAllow. (And by the way, the modules CAN
find Base.dll fine when this attribute isn't there).
Error emitting 'LimeLight.Lattice.SecurityAllow' attribute -- 'Failed to
load assembly Base -- System.IO.FileNotFoundException: File or assembly name
Base, or one of its dependencies, was not found.
File name: "Base"
Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = Base, Version=1.0.1136.20765, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\indigodrive\internal projects\motorcentral
v3.0\development
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to referen'
Any ideas appreciated.
Cheers
Greg B
- Next message: Dominic Caffey: "web.config in subdirectory security problem..."
- Previous message: AD: "Building Secure ASP.NET Applications"
- Next in thread: Joe Kaplan: "Re: Declarative Role-Based Security"
- Reply: Joe Kaplan: "Re: Declarative Role-Based Security"
- Reply: Jose Lema: "Declarative Role-Based Security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]