A method of the SPSecurity class, RunWithElevatedPrivileges executes the specified method with Full Control rights even if the user does not otherwise have Full Control.

learn more… | top users | synonyms

13
votes
4answers
9k views

Best way to Impersonate in SharePoint

So far, I am aware of below 3 ways of performing impersonation in a SharePoint web part or page : Using Win32 API [DllImport("advapi32.dll", SetLastError=true)] public static extern bool LogonUser(...
3
votes
1answer
3k views

Event Reciever run with elevated previledges

I created one event receiver and deployed it, but only users who are site collection admins are able to view this web part. I have included the SPSecurity.RunWithElevatedPrivileges but the same thing. ...
2
votes
2answers
159 views

Need comments for code within SPSecurity.RunWithElevatedPrivileges

I am investigating the below code to make sure if its quality is as per Microsoft standards. Actually Comments came from Microsoft code reviewer that we need to create new SPSite Object within the ...
2
votes
3answers
4k views

Application page in layouts folder accessing web application object

There is an application page, deployed to the layouts folder. The URL of the app page is: http://server:port/sc2/_layouts/test/mypage.aspx Now, there is a user with read only permissions (added ...
0
votes
1answer
612 views

Can SPPersistedObject settings be updated by normal users if ran with elevated privileges?

I have a custom ribbon icon "Enlist" deployed to each document library. A normal (i.e. non-admin) user can click this icon; when he does, I would like to permanently save the document library ...