<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_has_access(self, user):
 """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 """

        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