---
title: "Limit the assignee to a specific group"
canonical: "https://support.appfire.com/space/PSJ/15482860/Limit%20the%20assignee%20to%20a%20specific%20group"
format: markdown
---
> Macro (aura-html)

Here’s a video on how you can limit the assignee to a specific group.

 

Use the following script as a workflow transition validator to allow transition only if the assignee is in a specific user group.

```
string errorMsg = "You can only assign issues to members of your same team";

if(userInGroup("Customer Relations Team", currentUser()) && userInGroup("Customer Relations Team", assignee)) {
return true;
}
else {
return false, "error", errorMsg;
}
```