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

calculation : check current user in users group

$
0
0

hi,

 

Via a calculaion, I need to check if current user is in users's group from category object.

 

 

Import System

static def GetAttributeValue(Request):

    Value = false

    currentuserName = Request.GetCurrentUserName().ToLower()

    for grp  in Request.Category._CONSGrpValFonc.UserGroups:

        item = grp.User

        if item.Name.ToLower() == currentuserName.ToLower() :

            value = true

    return Value

 

 

syntax is correct however if I test calculation I have an error message : cannot read attribute value 'UserGroups' of class type system. group

 

Has anyone any ideas please ?

 

Thanks

 

Regards


Viewing all articles
Browse latest Browse all 12704

Trending Articles