AnsweredAssumed Answered

Instance Level Rights XOG

Question asked by N.P on Feb 21, 2012
Latest reply on Feb 22, 2012 by Dave
Hi,

I need to create a process to manage instance level rights for user. Mainly I need to manage Enter and Approve Time. I need to make sure manager has access to his direct reports only (no one extra and no one less).

I have 2 approach :

XOG OUT XML for specific resource

1. Xog out XML for specific resource
2. Edit received XML Object and remove all Resource Enter time and Approve time rights tags.
3. Keep all other instance level rights as it is and add Completed = "true" (to make sure overwrite)
4. Query direct reports and add Enter time and approve time tags into above edited XML Object.
5. Xog object back in.

I dont know how to do step 2,3,4.

For all instance level rights using query

1. Query all instance level rights from oracle. I have query which returns rights and object ID, but not sure how can I include object code in output. I cannot use SP otherwise, I can use dynamic sql to get code from object table.

SELECT DISTINCT SRM.UNIQUE_NAME "Resource ID",
SRM.FULL_NAME "Resource Name",
G.GROUP_NAME "Access Right Name",
(select srmr.unique_name from srm_resources srmr where id = object_instance_id),
object_instance_id,
G.DESCRIPTION DESCRIPTION,
G.RIGHT_TYPE GRANTED_THROUGH_TYPE,
O.NAME GRANTED_THROUGH,
'' GROUP_NAME,
(SELECT FULL_NAME
FROM SRM_RESOURCES
WHERE USER_ID = A.CREATED_BY)
"Granted By",
TO_CHAR (A.CREATED_DATE, 'DD-Mon-YYYY') "Granted Date",
'Resource Access Rights: Instance' "Access Right Type"
FROM CMN_SEC_ASSGND_OBJ_PERM A,
CMN_SEC_GROUPS_V G,
ODF_OBJECTS_V O,
SRM_RESOURCES SRM
WHERE SRM.USER_ID = A.PRINCIPAL_ID
AND A.PRINCIPAL_ID = 5091962
AND A.PRINCIPAL_TYPE = 'USER'
AND A.RIGHT_ID = G.ID
AND G.RIGHT_TYPE = O.RIGHT_CODE
AND G.LANGUAGE_CODE = 'en'
AND O.LANGUAGE_CODE = 'en'
AND G.IS_ACTIVE = 1

2. After this form XML and xog in. This I know how to do. Step 1 is making this approach difficult.

Thanks In advance for help.

NP.

Outcomes