def has_generic_permission(self, request, permission_type):
        user = request.user
        if not user.is_authenticated():
            return False
        elif user.is_superuser:
            return True
        elif user == self.owner:
            return True
        elif self.folder:
            return self.folder.has_generic_permission(request, permission_type)
        else:
            return False
Return true if the current user has permission on this
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/module/media/models/abstract.py/BaseImage.has_generic_permission