Friday, May 20, 2016

SharePoint Site Collection Administrators : Jquery

var user = SP.ClientContext.get_web().get_currentUser();

var value = user.get_isSiteAdmin ();
SPServices:

$().SPServices({
   operation: "GetUserInfo",
   userLoginName: $().SPServices.SPGetCurrentUser(),
   completefunc: function(xData, Status) {
   console.log$(xData.responseXML).find("User").attr("IsSiteAdmin"))
   }
});

No comments:

Post a Comment