'Can the :class:`User` view this profile?
Returns a boolean if a user has the rights to view the profile of this
user.
Users are divided into four groups:
``Open``
Everyone can view your profile
``Closed``
Nobody can view your profile.
``Registered``
Users that are registered on the website and signed
in only.
``Admin``
Special cases like superadmin and the owner of the profile.
Through the ``privacy`` field a owner of an profile can define what
they want to show to whom.
:param user:
A Django :class:`User` instance.'

def can_view_profile(self, user):

    if (self.privacy == 'open'):
        return True
    elif ((self.privacy == 'registered') and isinstance(user, get_user_model())):
        return True
    elif ('view_profile' in get_perms(user, self)):
        return True
    return False
