Elevating privileges using spservices

Aug 18, 2012 at 10:22 AM

Hi,

 

I have a quick query . Is it possible to elevate privileges using SPSERVICES JQUERY library , if yes then how?

Aug 18, 2012 at 1:31 PM
Edited Aug 18, 2012 at 1:32 PM

Yes, call a workflow that uses an impersonation step. Add your logic inside that workflow.

http://spservices.codeplex.com/wikipage?title=StartWorkflow&referringTitle=Workflow

Cheers,
Matt 

Coordinator
Aug 18, 2012 at 1:43 PM

But the more direct answer is that you cannot do impersonation or permission elevation client side:
http://sympmarc.com/2011/05/27/elevating-permissions-with-sharepoints-web-services/

M.

Aug 18, 2012 at 3:35 PM

I'm pretty sure you can send your own username and password down the pipe via AJAX with the web services. Obviously, I've never tried b/c I know the security ramifications of doing so, but a username and password parameter is available to your with the AJAX request.  You *could* override the SPService default authentication (current user) by using the $.ajaxSetup() method. 

I am absolutely not saying you should though. The username and password will be sent down the pipe in clear text, which is never a real good idea...

Cheers,
Matt 

Coordinator
Aug 18, 2012 at 4:20 PM

I don't even mention that because it's such a bad idea. You'd have to put the credentials into your script. DON'T DO IT!

M.

Apr 22, 2013 at 9:07 AM
Thanks, actually i found out a method of completing the assignment without using special privileges....