Ниже приведен пример использования операции GetMbSec для получения информации о группах пользователей, созданных в менеджере безопасности репозитория. В запросе передается моникёр соединения с репозиторием. В ответе приходит информация о группах пользователей.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S1!M"
},
"tArg" :
{
"pattern" :
{
"groups" : "Get",
"group" :
{
"data" : "true",
"members" : "Get"
}
}
}
}
}
{
"GetMbSecResult" :
{
"id" :
{
"id" : "S1!M"
},
"meta" :
{
"groups" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "АДМИНИСТРАТОРЫ",
"n" : "АДМИНИСТРАТОРЫ",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-1",
"type" : "Group"
},
"data" :
{
"desc" : "Встроенная группа администраторов",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "Пользователь",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-1",
"type" : "User"
}
},
{
"k" : "35005",
"id" : "USER123456789",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-35005",
"type" : "User"
}
},
{
"k" : "2147483637",
"id" : "PROGNOZ\GNRSPO",
"n" : "PROGNOZ\GNRSPO",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-11463",
"type" : "Group"
}
},
{
"k" : "67467",
"id" : "USER_ANN",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-67467",
"type" : "User"
}
},
{
"k" : "2147483646",
"id" : "FS\IVANOV.IVAN",
"n" : "Иванов Иван Иванович",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "S-1-5-21-2210245889-1953428358-4221806923-1269",
"type" : "User"
}
},
{
"k" : "105163",
"id" : "USER_1234",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-105163",
"type" : "User"
}
},
{
"k" : "197730",
"id" : "NEWREPOADMIN",
"n" : "NewRepoAdmin",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-197730",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483650",
"id" : "ПОЛЬЗОВАТЕЛИ",
"n" : "ПОЛЬЗОВАТЕЛИ",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-2-2",
"type" : "Group"
},
"data" :
{
"desc" : "Встроенная группа пользователей",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "1",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "20798",
"id" : "SIDOROV_IV",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-20798",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483637",
"id" : "PROGNOZ\GNRSPO",
"n" : "PROGNOZ\GNRSPO",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-11463",
"type" : "Group"
},
"data" :
{
"desc" : "Направление разработки системного ПО",
"isNT" : "1",
"isExternal" : "1",
"isBuiltin" : "0",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "1899-12-30T00:00:00.000",
"hasAccessToRepository" : "1",
"isAdmin" : "0",
"isIsa" : "0",
"isRoled" : "0",
"changePassStamp" : "2020-03-23T09:07:03.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
},
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "8835",
"id" : "PROGNOZ\TESTGROUP1",
"n" : "PROGNOZ\TESTGROUP1",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-10952",
"type" : "Group"
},
"data" :
{
"isNT" : "1",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483615",
"id" : "PROGNOZ\TESTGROUP2",
"n" : "PROGNOZ\TESTGROUP2",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-1287548229-1982989762-879972363-10953",
"type" : "Group"
},
"data" :
{
"isNT" : "1",
"isExternal" : "0",
"isBuiltin" : "0",
"user" :
{
"mustChangePasswordAtNextLogon" : "0",
"cannotChangePassword" : "0",
"lockedState" : "NotLocked",
"manageDBGrants" : "1",
"maxLogonSessions" : "0",
"lastLoginStamp" : "1899-12-30T00:00:00.000",
"hasAccessToRepository" : "1",
"isAdmin" : "0",
"isIsa" : "0",
"isRoled" : "0",
"changePassStamp" : "2020-03-23T09:07:03.000",
"autoRun" : "",
"temporaryAge" : "0",
"eternalPass" : "0",
"certificate" : ""
},
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "2147483622",
"id" : "FS\DOMAIN GUESTS",
"n" : "FS\DOMAIN GUESTS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "S-1-5-21-2210245889-1953428358-4221806923-514",
"type" : "Group"
},
"data" :
{
"desc" : "All domain guests",
"isNT" : "1",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" : ""
},
"hasAccessToken" : "0"
}
}
},
{
"k" : "144122",
"id" : "BPM_ALL_USERS",
"n" : "BPM_ALL_USERS",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "PS-1-144122",
"type" : "Group"
},
"data" :
{
"desc" : "Группа, включающая всех пользователей бизнес-процессов",
"isNT" : "0",
"isExternal" : "1",
"isBuiltin" : "0",
"group" :
{
"members" :
{
"its" :
{
"it" :
[
{
"k" : "105163",
"id" : "USER_1234",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "PS-1-105163",
"type" : "User"
}
}
]
}
},
"hasAccessToken" : "0"
}
}
}
]
}
},
"bisearchEnable" : "Full",
"apply" :
{
"onCredentialsRequired" :
{
"logonParams" :
{
"descr" : "Введите имя и пароль пользователя, обладающего правами создания таблиц в базе данных 'База данных'",
"realm" : "OBJ21909",
"toAdmin" : "1",
"logonData" :
{
"driver" : "MSSQL2012",
"server" : "test-server",
"database" : "Warehouse"
}
}
}
}
}
}
}
public static GetMbSecResult GetGroupInfo(string mb)
{
var somClient = new SomPortTypeClient(); //Прокси-объект для выполнения операций
//Параметры выполнения операции
var getMbSec = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
groups = ListOperation.Get,
group = new MbSubjectPattern()
{
data = true,
members = ListOperation.Get
}
}
},
tMbSec = new MbId() { id = mb}
};
//Получение информации о группах пользователей
var result = somClient.GetMbSec(getMbSec);
return result;
}
См. также: