src/user/index.js
function hasRole(role) {
    role = isArray(role) ? role : [role];
    return 0 < intersection(role, userBuiltInStore.getRoles()).length;
}
function hasRole(role) {
    role = isArray(role) ? role : [role];
    return 0 < intersection(role, userBuiltInStore.getRoles()).length;
}
function hasRole ( role ) { role = isArray ( role ) ? role : [ role ] ; return 0 < intersection ( role , userBuiltInStore . getRoles ( ) ) . length ; }
Check if a user has the givent role or roles.
@param  {string | array}  role - Check if the user has one or many roles.
@return {Boolean} - True if the user has at least on of the givent roles.
Check if a user has the givent role or roles .