<< Click to Display Table of Contents >>

GetGroupListAuthToItem

아이템에 대해 특정 권한 이상의 권한을 가진 모든 그룹 정보를 가져옵니다.

Prototype

bool GetGroupListAuthToItem(string ItemFullPath, string Permission, array GroupNames, array GroupFullPaths)

Parameters

ItemFullPath

아이템 전체 경로

Permission

권한 정보

None, View, Read, ReadWrite 중 하나의 값으로 설정

GroupNames

그룹 이름을 가져올 배열

GroupFullPaths

그룹 전체 경로를 가져올 배열

Reference

그룹 정보를 가져온 경우 true가 리턴되고, 실패한 경우 false가 리턴됩니다.

Example

function getGroupListAuthToItem(){

   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 groupNames = new Array();

       var groupFullPaths = new Array();

       var result = rep.GetGroupListAuthToItem(itemFullPath, permission, groupNames, groupFullPaths);

       if (result == true) {

           for (i=0; i < groupNames.length; i++) {

               _DEBUG("result="+result+" groupNames["+i+"]="+groupNames[i]+"   groupFullPaths["+i+"]="+groupFullPaths[i]);

           }

       } else {

           _DEBUG("result="+result+" ["+rep.GetLastErrorCode()+"] "+rep.GetErrorMessageByCode(rep.GetLastErrorCode()));

       }

       rep.Logout();

   }

}