Clarity: Missing 'Resource - Self (Auto)' instance right is missing on a resource
search cancel

Clarity: Missing 'Resource - Self (Auto)' instance right is missing on a resource

book

Article ID: 51631

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

There are new or existing resources with missing Resource - Self (Auto) right. 

The "Resource - Self (Auto)" is an instance right assigned automatically when the user is created. This right is automatically granted to the resource and it includes the Resource - Edit Ideas access right.

Once the resource is created using Clarity UI, if there is any XOG performed on this resource with "Trackmode" = "None", that might delete the "Resource-Self" right from the resource's rights. The issue might also be caused by other actions as well that have not been established.

It can happen on both new or existing resources

Environment

Release: Any releases with this issue

Resolution

Workaround:
In order to re-establish the missing "Resource-Self (Auto)" instance right, run the following query against the Database.

   select 'exec cmn_sec_assign_inst_right_sp ( ''USER'', '''||user_name||''',
   ''ResourceSelf'','|| r.id || ');' from cmn_sec_users u, srm_resources r
   where r.user_id = u.id
   and u.id not in (select csaop.principal_id
   from cmn_sec_assgnd_obj_perm csaop, cmn_sec_groups g
   where g.group_code = 'ResourceSelf'
   and csaop.principal_type = 'USER'
   and csaop.right_id = g.id)

The output the query above will return stored procedure statements for users missing the "Resource - Self (auto)" instance right.

Below is an example of the output.

   exec cmn_sec_assign_inst_right_sp ( 'USER', 'username',
   'ResourceSelf',5000001);
  1. Run all the stored procedures statements returned by the first.
  2. Commit the changes.

Solution:

This issue has been documented previously as CLRT-56179, CNR in 13.2 and higher.

If you are experiencing this problem and the workaround above does not significantly help, or you have steps with which you are able to reproduce the problem, please contact Broadcom Clarity Support.

Additional Information

The updated queries for Postgres are below: 

   select 'call cmn_sec_assign_inst_right_sp ( ''USER'', '''||user_name||''',
   ''ResourceSelf'','|| r.id || ');' from cmn_sec_users u, srm_resources r
   where r.user_id = u.id
   and u.id not in (select csaop.principal_id
   from cmn_sec_assgnd_obj_perm csaop, cmn_sec_groups g
   where g.group_code = 'ResourceSelf'
   and csaop.principal_type = 'USER'
   and csaop.right_id = g.id)

call cmn_sec_assign_inst_right_sp ( 'USER', 'username', 'ResourceSelf',5000001);