답변

0

이 내가 무엇을 사용

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; 
    }); 
}