Exemplo n.º 1
0
 public static void Elevated(string url, string listName, Action <SPCtx> ctxAction)
 {
     SPSecurity.RunWithElevatedPrivileges(() =>
     {
         using (SPCtx ctx = new SPCtx(url, listName))
         {
             ctxAction(ctx);
         }
     });
 }
Exemplo n.º 2
0
 public static void Elevated(string url, string listName, Action<SPCtx> ctxAction)
 {
     SPSecurity.RunWithElevatedPrivileges(() =>
     {
         using(SPCtx ctx = new SPCtx(url, listName))
         {
             ctxAction(ctx);
         }
     });
 }