How to Hide Delete option from Affected Ci related List

MounikaS
Tera Contributor

Hi,

How do I disable Delete option to ITIL users from the "Action on selected rows".I only want to remove it from the Affected CIs related list(task_ci table)

It should visible to Admin and Change manager team.

Could someone please help me on this.

Regards,

Mounika

find_real_file.png

1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi Mounika

Delete is a UI action written on global table and is not specific to task_ci. So you might have to create a separate UI action Delete for task_ci and there you can add a condition

gs.hasRole("admin")||gs.hasRole("change_manager")

And for existing Delete UI action, you can add the below condition to existing condition to avoid showing the global delete for task_ci like below

current.getTableName()!='task_ci'

Kindly mark the comment as a correct answer and also helpful if it answers your question.

View solution in original post

13 REPLIES 13

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

That can be done by managing delete ACL on task_Ci table.

For whom you want to hide it?

 

Thanks,
Ashutosh

asifnoor
Kilo Patron

Hi Mounika

Delete is a UI action written on global table and is not specific to task_ci. So you might have to create a separate UI action Delete for task_ci and there you can add a condition

gs.hasRole("admin")||gs.hasRole("change_manager")

And for existing Delete UI action, you can add the below condition to existing condition to avoid showing the global delete for task_ci like below

current.getTableName()!='task_ci'

Kindly mark the comment as a correct answer and also helpful if it answers your question.

Thank for the code @asifnoor 

It is working as expected.

 

Why not adjust ACL instead of the button. It is Global button and i wont suggest that.

@asifnoor Thoughts?


Thanks,
Ashutosh