def is_allowed(request, username):
    """ Checks if a given request is allowed to access a given user image """
    # Super-users can immediatly access everything
    if request.user and request.user.is_superuser:
        return True
    
    return request.user.username == username