code: def user_has_access(self, user):
          
          if ROLE_ADMIN in user.roles:
              return True
  
          # Non-admin users should only see active accounts
          if self.enabled:
              if not self.required_roles:
                  return True
  
              for role in self.required_roles:
                  if role in user.roles:
                      return True
  
          return False
docs: Check if a user has access to view information for the account
  
          Args:
              user (:obj:`User`): User object to check
  
          Returns:
              True if user has access to the account, else false