GlideUser - hasRole(String role)

Returns true if the current user has the specified or admin role.

Table 1. Parameters
Name Type Description
role String The role
Table 2. Returns
Type Description
Boolean Returns true if the current user has the specified or admin role, otherwise returns false.

var isAdmin = g_user.hasRole('admin');