Domanda

Sono qui per ottenere alcuni dettagli sull'elenco delle informazioni utente (disponibile su http:// Domainname.com / _catalogs / utenti / simple.aspx ), che ho trovato su Internet.

Come è disponibile sotto _catalogi, solo gli amministratori dovrebbero avere accesso all'elenco, che mi è succedente anche a me.

Ma quando metto un po 'di script in un editor di contenuti e ho dato la pagina a una persona che ha appena letto i diritti sul sito, lo script ha recuperato i dati.

Sotto è lo script che ho usato:

<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>
.

Per favore, potresti spiegarmi le cose come sono molto confuso.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top