project/server/middleware/rbac.js
function hasRole(user = null, role = null) {
  return user && role && user.hasRole(role);
}
function hasRole(user = null, role = null) {
  return user && role && user.hasRole(role);
}
function hasRole ( user = null , role = null ) { return user && role && user . hasRole ( role ) ; }
This checks to see if the user has the given role.

@param {object} user the user object
@param {string} role the role
@returns {boolean}  whether or not the user has the role
This checks to see if the user has the given role .