Declarative Security, using multiple attributes OR'd together.

From: TL (tom_laramee_at_yahoo.com)
Date: 07/21/03


Date: 21 Jul 2003 12:22:00 -0700


hi:

i'm using declarative security in a C# application, eg:

  [RolePermission(SecurityAction.Demand, Role="MyRole1")]
  private void Page_Load(object sender, System.EventArgs e)
  {
    ...
  }

i was wondering what the syntax is for OR'ing 2 (or more)
of these declarations together, something like:

  [RolePermission(SecurityAction.Demand, Role="MyRole1" | "MyRole2" )]
  private void Page_Load(object sender, System.EventArgs e)
  {
    ...
  }

so that no exception is thrown if the user has either of
the roles.

thanks!



Relevant Pages

  • Re: Declarative Security, using multiple attributes ORd together.
    ... Any opinions or policies stated within it are my own and do not necessarily constitute those of my employer. ... > i'm using declarative security in a C# application, ... > private void Page_Load(object sender, ...
    (microsoft.public.dotnet.security)
  • Whats the difference, if any?
    ... Except for the syntax, what is the difference, if any, between this... ... private void Form1_Paint(object sender, PaintEventArgs e) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Declarative Security, using multiple attributes ORd together.
    ... The ability to "OR" declarative security attributes will be in a future ... For current releases you could create multiple wrapper methods ... > private void Page_Load(object sender, ...
    (microsoft.public.dotnet.security)
  • Re: Threading problem
    ... Alvin Bruney ... private void goToolStripMenuItem_Click(object sender, EventArgs ... private void drawBitmap(BackgroundWorker worker, DoWorkEventArgs ... BackgroundWorker worker = sender as BackgroundWorker; ...
    (microsoft.public.dotnet.framework)
  • Re: Threading problem
    ... I tried to run your project but it doesn't compile under 2.0. ... private void goToolStripMenuItem_Click(object sender, EventArgs ... private void drawBitmap(BackgroundWorker worker, DoWorkEventArgs ... BackgroundWorker worker = sender as BackgroundWorker; ...
    (microsoft.public.dotnet.framework)