Scoped GlideUser - hasRole(String role)

Determines if the current user has the specified role.

Table 1. Parameters
Name Type Description
role String The role to check.
Table 2. Returns
Type Description
Boolean True if the user has the role.
var currentUser = gs.getUser(); 
gs.info(currentUser.hasRole('admin'));

Output: