Notifications

99 views

Symptoms


g_user.hasRole is returning false if users have external roles. If user has roles like snc_external or sn_customerservice.customer combined with any other internal role like 'itil' g_user.hasRole for itil will return even though user has this role.

Release


ALL

Cause


hasRoles() method returns false because the system considers external users to be without a role.

Resolution


This behavior is expected. snc_external or sn_customerservice.customer is a special role which is used to indicate a user is an external user. getRole() for an external user always return false since by definition an external user has no role on an instance.  

Additional Information


Here is the documentation about it: The hasRoles() method 

Article Information

Last Updated:2018-10-22 16:28:56
Published:2018-10-22