bool SetSubjectAttributes(MbId tMbSec, SubjectAttributesMd tArg)
tMbSec. Repository connection moniker.
tArg. Operation execution parameters.
The SetSubjectAttributes operation changes links between user attributes and attributes of external storage areas/domains with information about security subjects.
To execute the operation, in the tMbSec field specify repository connection moniker, and in the tArg.map field specify the collection of links between user attributes and attributes of external storage areas/domains. The moniker can be obtained on executing the OpenMetabase operation.
The operation results in the logical true if the list of attribute links was changed successfully.
Below is the example of changing the list of links between user attributes and attributes of external storage areas/domains. The request contains the repository connection moniker and the updated list of attribute links. The response contains whether link attributes were changed successfully.
{
"SetSubjectAttributes" :
{
"tMbSec" :
{
"id" : "JCAEDGIAEJIIGOAEFHCJFBCOOJFHLPDECIEENLOPENFKIIGD!M"
},
"tArg" :
{
"map" :
{
"it" :
[
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "1",
"extAttrName" : "EMAIL"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "1",
"extAttrName" : "USER_ACCESS"
},
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "2",
"extAttrName" : "USER_EMAIL"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "2",
"extAttrName" : "USER_ACCESS"
},
{
"attrKey" :
{
"k" : "3",
"id" : "EMAIL"
},
"provider" : "1",
"realm" : "SUBDOMAIN",
"extAttrName" : "EMAIL2"
},
{
"attrKey" :
{
"k" : "1",
"id" : "ACCESS"
},
"provider" : "3",
"realm" : "",
"extAttrName" : "USER_ACCESS"
}
]
}
}
}
}
{
"SetSubjectAttributesResult" : "1"
}
public static bool SetSubjectAttributes(string moniker, SubjectAttributeMapping[] newAttrMap)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
var tSet = new SetSubjectAttributes()
{
tArg = new SubjectAttributesMd()
{
map = newAttrMap
},
tMbSec = new MbId() { id = moniker }
};
// Get information about links between user attributes and attributes of external storage areas/domains
var result = somClient.SetSubjectAttributes(tSet);
return result;
}
See also: