Below is the example of using the GetMbSec operation to get description of repository objects' security. The request contains the repository connection moniker and the collection of keys of objects, for which security description is obtained. The response contains information about the security subjects, for which any access permissions for the specified repository objects are set.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "S2!M"
},
"tArg" :
{
"pattern" :
{
"objects" : "true",
"objectsFilter" :
{
"keys" :
{
"i" : [ "72", "73" ] } } } } } }
{
"GetMbSecResult" :
{
"id" :
{
"id" : "S2!M"
},
"meta" :
{
"objects" :
{
"ods" :
{
"its" :
{
"d" :
[
{
"@isShortcut" : "0",
"@isLink" : "0",
"@hf" : "0",
"i" : "",
"n" : "",
"k" : "72",
"c" : "1537",
"p" : "4294967295",
"h" : "0",
"sdKey" : "50"
},
{
"@isShortcut" : "0",
"@isLink" : "0",
"@hf" : "0", "i" : "", "n" : "", "k" : "73", "c" : "1537", "p" : "4294967295", "h" : "0", "sdKey" : "8209" } ]
}
},
"sds" :
{
"its" :
{
"it" :
[
{
"k" : "8209",
"isInherited" : "0",
"isSealed" : "0",
"discrete" :
{
"aces" :
{
"it" :
[
{
"subject" :
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44119CCF4F3EB315E1B1EF525736",
"type" : "User"
}
},
"allow" : "14",
"deny" : "16",
"audit" : "114700"
},
{
"subject" :
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "Embedded administrator group",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44219CCF4F3EB315E1B1EF525736",
"type" : "Group"
}
},
"allow" : "1"
},
{
"subject" :
{
"k" : "8208",
"id" : "PPUSER",
"n" : "PPUser",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44182089CCF4F3EB315E1B1EF525736",
"type" : "User"
}
},
"allow" : "98312",
"deny" : "16",
"audit" : "98312"
}
]
}
},
"mandatory" :
{
"accessToken" :
{
"its" : ""
}
}
},
{
"k" : "50",
"isInherited" : "1",
"isSealed" : "0",
"discrete" :
{
"aces" :
{
"it" :
[
{
"subject" :
{
"k" : "2147483649",
"id" : "ADMINISTRATORS",
"n" : "Embedded administrator group",
"vis" : "1",
"type" : "Group",
"sid" :
{
"sid" : "ACE44219CCF4F3EB315E1B1EF525736",
"type" : "Group"
}
},
"allow" : "1"
},
{
"subject" :
{
"k" : "2147483649",
"id" : "ADMIN",
"n" : "User",
"vis" : "1",
"type" : "User",
"sid" :
{
"sid" : "ACE44119CCF4F3EB315E1B1EF525736",
"type" : "User"
}
},
"allow" : "1"
}
]
}
},
"mandatory" :
{
"accessToken" :
{
"its" : "" } } } ] } } } } } }
The GetObjectSecurityDescriptor function specified below extracts description of security for the specified repository objects. The repository connection moniker and the collection of keys are sent as input parameters of the function. The result of the operation is the result of the function.
public static GetMbSecResult GetObjectSecurityDescriptor(string mb, int[] objKeys)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var getMbSec = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
objects = true,
objectsFilter = new MbSecOdFilter()
{
keys = objKeys
}
}
},
tMbSec = new MbId() { id = mb }
};
//Get information on groups of users
var result = somClient.GetMbSec(getMbSec);
return result;
}
See also:
SOAP