Is there a Rest Api or any other function that can tell if a user with certain login name has full control in a particular web. I am trying to check if a user has full control in a web using jquery or rest api. Any ideas
Asked
Active
Viewed 747 times
1 Answers
0
this is what i use
function getUserRoles(webUrl,accountName)
{
return getUserEffectivePermissions(webUrl,accountName).then(function(data){
var permissions = new SP.BasePermissions();
permissions.initPropertiesFromJson(data);
var permLevels = [];
for(var permLevelName in SP.PermissionKind.prototype) {
if (SP.PermissionKind.hasOwnProperty(permLevelName)) {
var permLevel = SP.PermissionKind.parse(permLevelName);
if(permissions.has(permLevel)){
permLevels.push(permLevelName);
}
}
}
return permLevels;
});
}

user388969
- 337
- 1
- 9
- 30