Below is the example of using the GetMbSec operation to get information about access attribute values that are set for repository administrator. The request contains repository connection moniker and security subject identifier. The response contains the obtained information about attribute values.
{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "ONEANHNAHPGEGOAEPHDPDIAOJHKJAKIEMIKIKJONNFBGAFHD!M"
},
"tArg" :
{
"pattern" :
{
"abacUsVals" : "true",
"abacUsValsFilter" :
{
"its" :
{
"Item" :
{
"sid" : "PS-1-1"
}
}
}
}
}
}
}
{
"GetMbSecResult" :
{
"id" :
{
"id" : "ONEANHNAHPGEGOAEPHDPDIAOJHKJAKIEMIKIKJONNFBGAFHD!M"
},
"meta" :
{
"bisearchEnable" : "Disable",
"abacUsVals" :
{
"its" :
{
"Item" :
{
"subjFilter" :
{
"n" : "ADMIN",
"sid" : "PS-1-1"
},
"attrs" :
{
"its" :
{
"Item" :
[
{
"n" : "Organization",
"id" : "ORGANIZATION",
"description" : "",
"k" : "1",
"dataType" : "Integer",
"val" : "1"
},
{
"n" : "RNU",
"id" : "RNU",
"description" : "",
"k" : "2",
"dataType" : "Integer",
"val" : "-1"
},
{
"n" : "LPDS",
"id" : "LPDS",
"description" : "",
"k" : "3",
"dataType" : "Integer",
"val" : "-1"
}
]
}
}
}
}
}
}
}
}
public static GetMbSecResult GetABACUserAttrs(string mb, string userSid)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetMbSec()
{
tArg = new GetMbSecArg()
{
pattern = new MbSecMdPattern()
{
abacUsVals = true,
abacUsValsFilter = new MbSecSubjFilter()
{
its = new AbacPatternFilter[]
{
new AbacPatternFilter()
{
sid = userSid
}
}
}
}
},
tMbSec = new MbId() { id = mb }
};
// Get user access attributes
var result = somClient.GetMbSec(tGet);
return result;
}
See also: