Ask a questionAsk a question
 

AnswerSPSecurity.RunWithElevatedPrivileges

  • Wednesday, November 04, 2009 8:59 PMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Update : I have found the answer(s) on msdn (in bold below)
    Note: One nice thing I have seen is the sdk API pages on msdn have a text for each class/method/member that says "Available in Sandboxed Solutions: Yes/No " -- How cool is that!

    1) Does anyone know if RunWithElevatedPrivileges in supported in sharepoint online (2010) for full trust code(non-sandbox) ? I have a requirement where a user will have to create a subsite but cannot give createsubsite or self service creation permission to him because that will allow them to create subsites beneath that site and so on..

    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity(office.14).aspx

    2) Is there a post on the web that tells me what namespaces/classes are supported in 'online' (2010) - I know this has to be a subset of sharepoint 2010 server, wanted to know the exact specifics.

    http://msdn.microsoft.com/en-us/library/ee537860(office.14).aspx




    Thanks
    Please mark solutions as answers (so that everyone knows the thread has been resolved)

Answers

  • Thursday, November 05, 2009 10:19 PMTroy Hopwood [MSFT]ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    SharePoint Onlne will not support full trust solutions. Only sandbox solutions will be allowed for deployed code. As such, runwithelevatedprivileges will not be supported.
    • Marked As Answer bySRIRAM R Friday, November 06, 2009 4:05 AM
    •  
  • Friday, November 06, 2009 4:05 AMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Well, I agree that runwithelevatedprivileges may not be supported, but full trust solutions *can be * called from sandbox solutions (using runtime proxy, i suppose)
    Please mark solutions as answers (so that everyone knows the thread has been resolved)
    • Marked As Answer bySRIRAM R Friday, November 06, 2009 4:05 AM
    •  

All Replies

  • Thursday, November 05, 2009 10:19 PMTroy Hopwood [MSFT]ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    SharePoint Onlne will not support full trust solutions. Only sandbox solutions will be allowed for deployed code. As such, runwithelevatedprivileges will not be supported.
    • Marked As Answer bySRIRAM R Friday, November 06, 2009 4:05 AM
    •  
  • Friday, November 06, 2009 4:05 AMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Well, I agree that runwithelevatedprivileges may not be supported, but full trust solutions *can be * called from sandbox solutions (using runtime proxy, i suppose)
    Please mark solutions as answers (so that everyone knows the thread has been resolved)
    • Marked As Answer bySRIRAM R Friday, November 06, 2009 4:05 AM
    •