<< Click to Display Table of Contents >>
GetUserListAuthToItem
아이템에 대한 사용자의 권한이 특정 권한 이상인 모든 사용자 정보를 가져옵니다.
Prototype
bool GetUserListAuthToItem(string ItemFullPath, string Permission, array UserNames, array Passwords, array Descriptions)
Parameters
ItemFullPath |
아이템 전체 경로 |
Permission |
권한 정보 None, View, Read, ReadWrite 중 하나의 값으로 설정 |
UserNames |
사용자 이름을 가져올 배열 |
Passwords |
사용자 패스워드를 가져올 배열 |
Descriptions |
설명을 가져올 배열 |
Reference
사용자 정보를 가져온 경우 true가 리턴되고, 실패한 경우 false가 리턴됩니다.
사용자 패스워드는 항상 공백으로 리턴됩니다.
Example
function getUserListAuthToItem(){
var rep = OZCreator.GetBuiltInObject(OZBuiltInObject.REPOSITORY);
var login = rep.Login("admin","admin");
if (login) {
var itemFullPath = "/parameter_test.odi";
var permission = "ReadWrite";
/ //None, View, Read, ReadWrite
var usernames = new Array();
var passwords = new Array();
var descriptions = new Array();
var result = rep.GetUserListAuthToItem(itemFullPath, permission, usernames, passwords, descriptions);
if (result == true) {
for (i=0; i < usernames.length; i++) {
_DEBUG("result="+result+" usernames["+i+"]="+usernames[i]+ " passwords["+i+"]="+passwords[i]+ " descriptions["+i+"]="+descriptions[i]);
}
} else {
_DEBUG("result="+result+" ["+rep.GetLastErrorCode()+"] "+rep.GetErrorMessageByCode(rep.GetLastErrorCode()));
}
rep.Logout();
}
}