Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 163
Registered: ‎11-17-2015

Get user ROLE in Workflow

Hello,

Is it possible to get the user ROLE in a WF? Cannot see a session parameter related to the role.

Thank you!

Yohann

Highlighted
Frequent Contributor
Posts: 77
Registered: ‎10-12-2015

Re: Get user ROLE in Workflow

[ Edited ]

Hello,

 

There is no session parameter related to the role. One user can have multiple roles.

 

One way is to use the authorization attribute:  authorization="ROLE[RoleName]" , which will hide the field/group/tab/... if the user dosen't have the mentioned role.

 

If you need to know if a user has a specific role you can use an SQL Script that you can put somewhere like in a defaultvalue of a textfield that is not persisted:

 

 

<Formfield name="HAS_ROLENAME" persisted="false" type="textfield" datatype="string" visible="hidden"
defaultvalue="SELECT CASE WHEN COUNT(1) > 0 THEN 1 ELSE 0 END FROM GMSC.DBO.SEC_ROLE R,GMSC.DBO.SEC_ROLE UR, GMSC.DBO.SEC_USER U WHERE R.ID = UR.ROLE_ID AND UR.USER_ID = U.ID AND U.ID = {SESSION.UserId} AND R.NAME = 'Rol Editor'" />

You can then use the value(0 or 1) of the HAS_ROLENAME field in your javascript with IG.getFieldById('HAS_ROLENAME').getValue() , or you can store the value in the session with a sessiontrigger.

 

Hope this helps.

 

Regards,

Radu

 

 

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.