docs: def check_object_permission(obj):
          """Retrieve object and abort if it doesn't exists."""
          check_permission(current_permission_factory(
              obj,
              'object-read'
          ))
          if not obj.is_head:
              check_permission(
                  current_permission_factory(obj, 'object-read-version'),
                  hidden=False
              )