I need to get approve , edit and read permissions for a site .How can i find this?

Use EffectiveBasePermissions to get permissions of the user. Example:

_spPageContextInfo.webAbsoluteUrl +"/_api/Web/effectiveBasePermissions"

In any case the end result is high and low permission masks use SP.BasePermissions().has as can be seen in below example:

function checkPermissions() {
return jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl +"/_api/Web/effectiveBasePermissions",
    type: "GET",
    dataType: "json",
    headers: {
        Accept: "application/json;odata=verbose"
    }
});

checkPermissions.done(function (data, textStatus, jqXHR) {
    var managePerms = new SP.BasePermissions();
    managePerms.initPropertiesFromJson(data.d.EffectiveBasePermissions);

    var manageLists = managePerms.has(SP.PermissionKind.manageLists);
    var manageGroup = managePerms.has(SP.PermissionKind.createGroups);
    var manageWeb = managePerms.has(SP.PermissionKind.manageWeb);
    alert("Manage Lists: " + manageLists);
    alert("Manage Group: " + manageGroup);
    alert("Manage Web: " + manageWeb);        
});
}

Try ajax call with URL format as https://yoursite/_api/web/roleassignments/getbyprincipalid(userid)/roledefinitionbindings

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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