Aurora_Gaimon

CA PPM: How to delete users’ rights, groups’ rights and users in groups with XOG

Blog Post created by Aurora_Gaimon Employee on Jul 5, 2017

As you may know, XOG is used to either insert or update data in CA PPM.

Did you know you can also remove? Yes, that's true, by using complete="true"

 

How does it work?

There are limited exceptions where you will be able to delete/remove using complete=”true”

Best way to understand is by examining some common examples.

 

 

-- Example Index  --

 

Groups:

a) Remove Users

     * How to remove ALL USERS from a group
     * How to remove SOME USERS from a group
b) Remove Rights
   b.1) Global Rights
     * How to remove ALL GLOBAL rights in that group
     * How to remove SOME USERS in that group
   b.1) OBS Rights
      * How to remove ALL OBS rights in that group
      * How to remove SOME OBS rights in that group
   b.1) Instance Rights

      * How to remove ALL INSTANCE rights in that group
      * How to remove SOME INSTANCE rights in that group

Users:

 a) Remove Global Rights
     * How to remove ALL GLOBAL rights from a user
     * How to remove SOME GLOBAL rights from a user
 b) Remove OBS Riights
      * How to remove ALL OBS rights from a user
      * How to remove SOME OBS rights from a user
 c) Remove Instance Rights

      * How to remove ALL INSTANCE rights from a user
      * How to remove SOME INSTANCE rights from a user

 

 

Let's get started!! 

 

Groups:

 

a) Remove Users

Follwoing data will be used during examples: A group Demo Group which has got 3 users (TestUser01; TestUser02; TestUser03) assigned.

 

  • How to remove ALL USERS from a group

In order to delete all users, use complete="true" in the members tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members complete="true">
</members>
<rights>
<InstanceRights/>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

  • How to remove SOME USERS from a group

In case you don't want to delete them all, you can also indicates which users should remain assigned. For example, we will remove just 02 and 03, 01 should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members complete="true">
<resource userName="TestUser01"/>
</members>
<rights>
<InstanceRights/>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

b) Remove Rights

b.1) Global Rights

Following data will be used during examples: A group Demo Group which has got 3 global rights granted.

 

  • How to remove  ALL GLOBAL rights in that group

In order to delete all global rights, use complete="true" in the GlobalRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<GlobalRights complete="true">
</GlobalRights>
<InstanceRights/>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

  • How to remove SOME USERS in that group

In case you don't want to remove them all, you can also indicates which global rights should remain granted. For example, we will remove 'Projects - Navigate' and 'Resources - Navigate', 'Idea - Navigate' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<GlobalRights complete="true">
<Right id="IdeasNavigate"/>
</GlobalRights>
<InstanceRights/>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

b.1) OBS Rights

Following data will be used during examples: A group Demo Group which has got 3 OBS rights granted.

 

  • How to remove  ALL OBS rights in that group

In order to delete all OBS rights, use complete="true" in the InstanceOBSRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<InstanceRights/>
<InstanceOBSRights complete="true">
</InstanceOBSRights>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

  • How to remove SOME OBS rights in that group

In case you don't want to remove them all, you can also indicates which OBS rights should remain granted. For example, we will remove 'Project - Edit' and 'Project - Delete', 'Project - View' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<InstanceRights/>
<InstanceOBSRights complete="true">
<Right id="ProjectViewFull">
<OBSAssoc id="corpDepartmentOBS" mode="OBS_UNIT_AND_CHILDREN" name="Corporate Department OBS" unitPath="/IT"/>
</Right>
</InstanceOBSRights>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

b.1) Instance Rights

Following data will be used during examples: A group Demo Group which has got 3 instance rights granted.

 

  • How to remove  ALL INSTANCE rights in that group

In order to delete all instance rights, use complete="true" in the InstanceRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<InstanceRights complete="true">
</InstanceRights>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

  • How to remove SOME INSTANCE rights in that group

In case you don't want to remove them all, you can also indicates which instance rights should remain granted. For example, we will remove 'Project - Edit' and 'Project - Delete', 'Project - view' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="15.2.0.213"/>
<groups>
<group code="z_demo_group" isActive="true">
<nls languageCode="en" name="Demo Group"/>
<members/>
<rights>
<InstanceRights complete="true">
<Right id="ProjectViewFull">
<InstanceObject id="PR1117" name="AC SAFe Implementation" type="SRM_PROJECTS"/>
</Right>
</InstanceRights>
<InstanceOBSRights/>
</rights>
</group>
</groups>
</NikuDataBus>

Results:

 

Users:

 

a) Remove Global Rights

Following data will be used during examples: A user TestUser01 which has got 3 global rights granted.

 

  • How to remove ALL GLOBAL rights from a user

In order to delete all global rights, use complete="true" in the GlobalRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<Groups/>
<GlobalRights complete="true">
</GlobalRights>
<InstanceRights/>
<InstanceOBSRights/>
</User>
</Users>
</NikuDataBus>

Results:

  • How to remove SOME GLOBAL rights from a user

In case you don't want to remove them all, you can also indicates which global rights should remain granted. For example, we will remove 'Ideas- Navigate' and 'Resources - Navigate', 'Project- Navigate' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<GlobalRights complete="true">
<Right id="ProjectsNavigate"/>
</GlobalRights>
<InstanceRights/>
<InstanceOBSRights/>
</User>
</Users>
</NikuDataBus>

Results:

 

c) OBS Rights

Following data will be used during examples: A user TestUser01 which has got 3 OBS rights granted.

 

  • How to remove ALL OBS rights from a user

In order to delete all OBS rights, use complete="true" in the InstanceOBSRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<GlobalRights/>
<InstanceRights/>
<InstanceOBSRights complete="true">
</InstanceOBSRights>
</User>
</Users>
</NikuDataBus>

Results:

  • How to remove  SOME OBS rights in that group

In case you don't want to remove them all, you can also indicates which OBS rights should remain granted. For example, we will remove 'Project - Edit' and 'Project - Delete', 'Project- View' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<GlobalRights/>
<InstanceRights/>
<InstanceOBSRights complete="true">
<Right id="ProjectViewFull">
<OBSAssoc id="corpDepartmentOBS" mode="OBS_UNIT_AND_CHILDREN" name="Corporate Department OBS" unitPath="/IT"/>
</Right>
</InstanceOBSRights>
</User>
</Users>
</NikuDataBus>

Results:

 

c) INSTANCE Rights

Following data will be used during examples: A user TestUser01 which has got 4 instance rights granted, which two of the they are  auto-rights and they cannot be deleted in CA PPM via UI (User Interface), therfore, they should not be deleted either when xogging.

 

  • How to remove ALL INSTANCE rights from a user

In order to delete all instance rights, use complete="true" in the InstanceRights tag:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<GlobalRights/>
<InstanceRights complete="true">
</InstanceRights>
<InstanceOBSRights/>
</User>
</Users>
</NikuDataBus>

Results:

** Note: Auto-rights are not removed.

 

  • How to remove  SOME INSTANCE rights in that group

In case you don't want to remove them all, you can also indicates which instance rights should remain granted. For example, we will remove 'Idea- View',  'Resource - Enter Time' should stay:

<?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd">
<Header action="write" externalSource="NIKU" objectType="user" version="15.2.0.213"/>
<Users>
<User externalId=" " userName="TestUser01" userStatus="ACTIVE" userUid="TestUser01">
<PersonalInformation emailAddress="TestUser01@dummy.com" firstName="TestUser01" lastName="TestUser01"/>
<Resource resourceId="TestUser01"/>
<GlobalRights/>
<InstanceRights complete="true">
<Right id="ResourceEnterTime">
<InstanceObject id="TestUser01" name="TestUser01, TestUser01" type="SRM_RESOURCES"/>
</Right>
</InstanceRights>
<InstanceOBSRights/>
</User>
</Users>
</NikuDataBus>

Results:

      ** Note: Auto-rights are not removed.

 

 

If you need help with CA PPM studio, security, XOG ... engage CA Services or ask questions in CA Communities.

 

That’s all. Thanks for reading until here. Did you like it? Please, don’t be shy and share it.

Outcomes