How to make a field visible in sc_task table for a particular assignment group?

Amith P
Kilo Contributor

Hello,

I have a requirement to make one field visible for a specific assignment group in catalog task. Say for example, a catalog task has been created and assigned to one particular assignment group 'X' via workflow/catalog group mapping, while raising a request using a service catalog. And the 'X' group member assign that particular task to another assignment group 'Y'. And a field (a string with drop down values) has to be visible only for the group 'Y' and not for 'X', in that catalog task.

I tried in UI policy, but the field is getting visible in both the groups. Tried ACL also, but not working. 

Please let me know if you have any work around.

Thanks,

Amith.

1 ACCEPTED SOLUTION

Kotaiah
Kilo Guru

Hi Amith,

 

You can achieve the above requirement using ACL's. You have to create two acls on task table for that particular field.

One for read access & other is for write access.

You have to use this below script in read acl:

answer = false;

if(gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
}


You have to use this below script in write acl:

answer = false;

if (gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
}

Regards,

Koptaiah Sadari

View solution in original post

7 REPLIES 7

Kotaiah
Kilo Guru

Hi Amith,

 

You can achieve the above requirement using ACL's. You have to create two acls on task table for that particular field.

One for read access & other is for write access.

You have to use this below script in read acl:

answer = false;

if(gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
}


You have to use this below script in write acl:

answer = false;

if (gs.getUser().isMemberOf(current.assignment_group)) {
answer = true;
}

Regards,

Koptaiah Sadari

Amith P
Kilo Contributor

Hi Koptaiah,

Thanks much. It worked for me by writing the ACL.

Cheers,

Amith.

Koptaiah,

 

I've try this and it doesn't work.  So current.assignment_group should just be the name of the group correct?

 

Thanks,

John