I'm a bit behind in my blog reading so only just read Nick's post about his blog post getting completely copied without even a link back.
I'm absolutely shocked that someone would do this, especially someone who is supposed to be a role model for the developer community !
I know how much work most mvp's and other community members like Nick put in to help other people in the developer community get ahead by doing heaps of research, answering questions and sharing information via blogs.
Someone like Patrick that just copies other peoples posts without credit gives the hard working community members a bad name. He's definitely off my RSS list.
Wednesday, October 04, 2006
SPSecurity.RunWithElevatedPrivileges
Most sharepoint code runs in the security context of the user that has accessed the site. This is great if you want to ensure that the code can't do anything that the logged in user shouldn't have access to, but I've often found that I wanted the code to be able to do things such as create a site even though the user doesn't have that permission.
In sharepoint 2003 this meant adding impersonation code. Once you add impersonation code you then have to work out where and how you are going to secure the user name and password. There are plenty of good options and information on the web about doing this, but it's a lot of code just to do something simple.
The great news in in MOSS 2007 they have added new functionality to the OM to help avoid this on the SPSecurity object. Have a look at this MSDN article for an example http://msdn2.microsoft.com/en-us/library/ms368312.aspx
In sharepoint 2003 this meant adding impersonation code. Once you add impersonation code you then have to work out where and how you are going to secure the user name and password. There are plenty of good options and information on the web about doing this, but it's a lot of code just to do something simple.
The great news in in MOSS 2007 they have added new functionality to the OM to help avoid this on the SPSecurity object. Have a look at this MSDN article for an example http://msdn2.microsoft.com/en-us/library/ms368312.aspx
Subscribe to:
Posts (Atom)