Getting User Access Attributes

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetMbSec xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMbSec xmlns="">
  <id>ONEANHNAHPGEGOAEPHDPDIAOJHKJAKIEMIKIKJONNFBGAFHD!M</id>
  </tMbSec>
<tArg xmlns="">
<pattern>
  <abacUsVals>true</abacUsVals>
<abacUsValsFilter>
<its>
<Item>
  <sid>PS-1-1</sid>
  </Item>
  </its>
  </abacUsValsFilter>
  </pattern>
  </tArg>
  </GetMbSec>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetMbSecResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>ONEANHNAHPGEGOAEPHDPDIAOJHKJAKIEMIKIKJONNFBGAFHD!M</id>
  </id>
<meta xmlns="">
  <bisearchEnable>Disable</bisearchEnable>
<abacUsVals>
<its>
<Item>
<subjFilter>
  <n>ADMIN</n>
  <sid>PS-1-1</sid>
  </subjFilter>
<attrs>
<its>
<Item>
  <n>Organization</n>
  <id>ORGANIZATION</id>
  <description />
  <k>1</k>
  <dataType>Integer</dataType>
  <val>1</val>
  </Item>
<Item>
  <n>RNU</n>
  <id>RNU</id>
  <description />
  <k>2</k>
  <dataType>Integer</dataType>
  <val>-1</val>
  </Item>
<Item>
  <n>LPDS</n>
  <id>LPDS</id>
  <description />
  <k>3</k>
  <dataType>Integer</dataType>
  <val>-1</val>
  </Item>
  </its>
  </attrs>
  </Item>
  </its>
  </abacUsVals>
  </meta>
  </GetMbSecResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetMbSec" :
{
"tMbSec" :
{
"id" : "ONEANHNAHPGEGOAEPHDPDIAOJHKJAKIEMIKIKJONNFBGAFHD!M"
},
"tArg" :
{
"pattern" :
{
"abacUsVals" : "true",
"abacUsValsFilter" :
{
"its" :
{
"Item" :
{
"sid" : "PS-1-1"
}
}
}
}
}
}
}

JSON response:

{
"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:

GetMbSec: Operation