0

I am here to get some details on User Information List(available at http://domainname.com/_catalogs/users/simple.aspx ), which i did find on the internet.

As it is available under _catalogs, only admins should have access to the list, which happend to me also.

But when i put some script in a content editor and gave the page to a person who has just read rights on the site, the script fetched the data.

Below is the script i used:

<script type="text/ecmascript" language="ecmascript">
    ExecuteOrDelayUntilScriptLoaded(getProfile, "sp.js");
    var _spUserId="domain\ID"
    var context = null;
    var web = null;    

    function getProfile() {
    alert(_spUserId);
        context = SP.ClientContext.get_current();
        web = context.get_web();
        userInfoList = web.get_siteUserInfoList();
        camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'Name\'/><Value Type=\'Text\'>' + _spUserId + '</Value></Eq></Where></Query><RowLimit>1</RowLimit></View>');
        this.listItems = userInfoList.getItems(camlQuery);
        context.load(listItems);
        context.executeQueryAsync(Function.createDelegate(this, this.onProfileSuccessMethod), Function.createDelegate(this, this.onFailureMethod));
    }

    function onProfileSuccessMethod(sender, args) {
        var item = listItems.itemAt(0);
        var tit = item.get_item('Title');
        if (tit) {
           alert(tit);
        } 
    }

    function onFailureMethod(sender, args) {
        alert('Error: ' + args.get_message() + '\n' + args.get_stackTrace());
    }
</script>

Please could some explain me the things as i am very confused.

2

Users have permission to read other users details. If you take the non-admin user, and have them click on a user name someone in SharePoint, like the Modified by of a list item, the user can view the editors profile. The actual list view, or URL in _catalogs, might be restricted, but the data within is not.

  • Hi David Thanks a lot.What you said seems right. Could you please share some articles on this, i will like to learn more about it. – Mohit Leekha Oct 31 '13 at 5:26
  • I don't have anything to read up on, this is just from my experience. – David Lozzi Oct 31 '13 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.