docs: def need_permissions(object_getter, action, hidden=True):
      """Get permission for buckets or abort.
  
      :param object_getter: The function used to retrieve the object and pass it
          to the permission factory.
      :param action: The action needed.
      :param hidden: Determine which kind of error to return. (Default: ``True``)
      """
      def decorator_builder(f):
          @wraps(f)
          def decorate(*args, **kwargs):
              check_permission(current_permission_factory(
                  object_getter(*args, **kwargs),
                  action(*args, **kwargs) if callable(action) else action,
  
              ), hidden=hidden)
              return f(*args, **kwargs)
          return decorate
      return decorator_builder