Re: clever friday code

2011-05-20 Thread Grant Molloy
Hi Steven, There are already an Attribute within the .net framework that are used to enforce permissions.. Try the PrincipalPermissionAttribute.. http://msdn.microsoft.com/en-us/library/system.security.permissions.principalpermissionattribute.aspx You could maybe use Reflector or other similar t

Re: clever friday code

2011-05-20 Thread Stephen Price
Do stuff to get customer - no security code >  } > } > > I've over simplified it, but how does that sound? > > Cheers. > > James. > > -Original Message- > From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On > Behalf Of Step

RE: clever friday code

2011-05-20 Thread James Chapman-Smith
security code } } I've over simplified it, but how does that sound? Cheers. James. -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Stephen Price Sent: Friday, 20 May 2011 16:59 To: ozDotNet Subject: clever friday code Hey al

clever friday code

2011-05-20 Thread Stephen Price
Hey all, I'm looking for a way to get at the value of the parameter of a method call from a custom attribute. [RequiresJobRole(JobRole.site_data_entry)] public void GetPerson(int personId) { // Do stuff if authorised } Then in the attribute protected