reversing changes to authorize
@@ -378,9 +378,7 @@ def authorize(request, res_id, needed_permission=ACTION_TO_AUTHORIZE.VIEW_RESOUR
raise NotFound(detail="No resource was found for resource id:%s" % res_id)
if needed_permission == ACTION_TO_AUTHORIZE.VIEW_METADATA:
- if res.raccess.discoverable or res.raccess.public:
- authorized = True
- elif not user.is_authenticated() and res.raccess.allow_private_sharing:
+ if res.raccess.discoverable or res.raccess.public or res.raccess.allow_private_sharing:
authorized = True
elif user.is_authenticated() and user.is_active:
authorized = user.uaccess.can_view_resource(res)
