Close should be closed by only Assignment Group Members and admin

Pallavi65
Tera Contributor

Hi All,

After upgrading to San-Diego, I found an issue in closing the CTasks.

The Assignment Group member of the change request, is able to close the change tasks also. This should not happen. Only the member of the Assignment group of the Ctask should be able to close the CHange task. 

So I feel like, the Close task button should be visible to only Assignment Group member of the Ctask.

Please help ,me here with code,

 

The cureent UI action is like this;

find_real_file.png

1 ACCEPTED SOLUTION

Musab Rasheed
Tera Sage
Tera Sage

Hi,

Please add this in your condition.

current.getUser().hasRole('admin) || (current.assingment_group != '' && gs.getUser().isMemberOf(current.assignment_group);

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

View solution in original post

3 REPLIES 3

Prasad Pagar
Mega Sage

Hi @Pallavi 

Add below as && condition in your current setup

gs.getUser().isMemberOf(current.assignment_group);

Thank you
Prasad

Musab Rasheed
Tera Sage
Tera Sage

Hi,

Please add this in your condition.

current.getUser().hasRole('admin) || (current.assingment_group != '' && gs.getUser().isMemberOf(current.assignment_group);

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

D_R
Giga Guru

you can add additional condition like  gs.getUser().isMemberOf(current.getValue("assignment_group"));