pnewhook
Novice

How Can I check if a User Is a Member of A Role

Is there any way to check if a user (the originator in my case) is a member of a Role? Ideally, I'd like to do this from Studio, without having to use the API.


Thanks,


Peter

0 Kudos
Reply
5 Replies
phung02
Apprentice

Re: How Can I check if a User Is a Member of A Role

You can check if user is a member of a k2 role by executing the Get Role Users of the UMUser smartobject. If you want to do it within a k2 process, then use inline function (Text- contains).

0 Kudos
Reply
pnewhook
Novice

Re: How Can I check if a User Is a Member of A Role

Can you point me to instructions on how to call this method? I haven't used SmartObjects too heavily yet.

0 Kudos
Reply
phung02
Apprentice

Re: How Can I check if a User Is a Member of A Role

Smartobject service tester is described at _http://jeylabsblog.com/2009/02/15/smartobject-service-tester/


Once you opened the smartobject service tester, expand smartobject explorer > all smartobjects > right-click on UMUsers. Then select the method to execute (Role to users), type in the input (role name) and click on execute.

0 Kudos
Reply
arunkaul
Novice

Re: How Can I check if a User Is a Member of A Role

Hi,

I am not able to find the Role to user SO method in he UMUsers SO.
Could you please let me know where I can find this method, I have checked this method is not listed in the UMUser SO.
0 Kudos
Reply
lkimberly
Apprentice

Re: How Can I check if a User Is a Member of A Role

Hi arunkaul and pwnewhook,


 


The method is called Get Role Users in the UMUser smo.  You may exexute this from the smartobject service tester. 6896iDD083BE70D07C1B0.png

0 Kudos
Reply