3

I have a Sharepoint 2010 installation. I am using Sp Services 2013.01 to get find if the current user is in a certain Sharepoint group. this works great if the url is not set to https. When the url is secured, the Status response from the call is error and the responseXMl is undefined. Here is an example of what I am doing:

var groupName = "My Group";
$().SPServices({
        operation: "GetGroupCollectionFromUser",
        userLoginName: $().SPServices.SPGetCurrentUser(),
        async: false,
        completefunc: function(xData, Status) { 
            if($(xData.responseXML).find("Group[Name='" + groupName + "']").length == 1) 
            {

                // Yes user is in group
                isUserInGroup = true;   
            }

        }
    });  

    return isUserInGroup;

But When the site is https it always comes back as error. This may not be a code problem and may be a IIS issue, but just trying to get some insight on what to look for check on.

thanks.

  • Found that with the new release of spservices, you can add the webUrl to the call, and take the version that the site is currently using. – Kenneth Lidke Aug 12 '13 at 15:46
  • 1
    If you have both http and https available (sounds like you do) then check that SPServices isn't loaded from the http one as in effect it's a cross domain call, which needs a proxy to work. Push the SPServices and the script above into a doclib to test. – Paul Leigh Aug 14 '13 at 14:52
  • Thanks Paul. I got this figured out, but that proxy between domain call still remains a problem with the list forms that are generated. – Kenneth Lidke Aug 14 '13 at 19:45

0 Answers0