This project has moved and is read-only. For the latest updates, please go here.

GetGroupCollectionFromUser - user permission

Feb 25, 2013 at 3:39 PM
Edited Feb 25, 2013 at 3:40 PM
I'm running the check-for-user-in-group from xslt within the people.aspx page and running into something I'm not sure about. If the logged-on user running the page does not have at leaset "Design, Limted Access" permission, the code will not run. If they do, it will. This does not make sense as it would seem that all users should be able to run this. So, I wanted to know if anyone else is esperiencing this. This is the code I'm running.
<script type="text/javascript"> $(document).ready(function() { $('div[id^="ObjectToHide"]').hide(); $().SPServices({ operation: "GetGroupCollectionFromUser", userLoginName: $().SPServices.SPGetCurrentUser(), async: false, completefunc: function(xData, Status) { if($(xData.responseXML).find("Group[Name='Group Name']").length == 1) { $('div[id^="ObjectToHide"]').show(); } else { $('div[id^="ObjectToHide"]').hide(); } } }); }); </script>
Feb 26, 2013 at 8:15 PM

Did you get this working? I think it's connected to the comments you left on my blog?