code: function checker (uid, ownerId, userRoles, requiredRoleList) {
    if (requiredRoleList.length === 0) {
      return false
    }
  
    if (requiredRoleList.includes(builtinRoles.Everyone)) {
      return true
    }
  
    if (uid && requiredRoleList.includes(builtinRoles.Authenticated)) {
      return true
    }
  
    for (const role of userRoles) {
      if (requiredRoleList.includes(role)) return true
    }
  
    // TODO: roles.Owner is actually a finer-grained restriction over usual roles. Not this.
    return requiredRoleList.includes(builtinRoles.Owner) &&
      uid &&
      (ownerId === uid)
  }
docs: getRequiredRoleList