Thursday, September 10, 2015

Remove instance level access rights using XOG

Suppose you have xml for instance right to a user -
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="12.0.2.5101"/>
<Users>
<User externalId=""
userName="aaaaa">
<PersonalInformation emailAddress="aaaa@bbb.com" firstName="xyz" lastName="cde"/>
<Resource resourceId="aaaaa" />
<InstanceRights>
<Right id="yyyyyyyyyyy" >
<InstanceObject id="A.xxxxx" type="SRM_PROJECTS" />
</Right>
</InstanceRights>
</User>
</Users>
</NikuDataBus>

So you just include the "tag" in the instance rights section -
<InstanceRights complete="true">

Including the above removes all the instances rights of the mentioned user(s) in the xml.

NJ