Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Process precondition where CurrentUser is 'member of' assigned group

$
0
0

Try something like this:

 

import System
static def GetAttributeValue(Change):  Value = false  if Change.Assignments.Count > 0:       if Change.Assignments.Group != null:            AssignedGroup = Change.Assignments.Latest().Group.Title            CurrentUserName = Change.GetCurrentUserName.ToLower()            AssignedGroupTitle = Change.GetObjectByAttribute("System.Group", "Title", AssignedGroup)            for item in AssignedGroupTitle.UserGroups:                 if item.User.Name.ToLower() == CurrentUserName:                      Value = true  return Value

Viewing all articles
Browse latest Browse all 12704

Trending Articles