这是indexloc提供的服务,不要输入任何密码
Skip to content

Attempting to insert with an on_conflict ignores mutation fails without modify permission #8260

@sproctor

Description

@sproctor

Version Information

Server Version: 2.2.0

Environment

OSS

What is the expected behaviour?

https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/upsert.html#ignore-request-on-conflict

I expect that behavior to happen even when the user does not have access to modify the data.

Keywords

ignore insert on_conflict

What is the current behaviour?

Gives the error: "insert_XXX" has no argument named "on_conflict"

How to reproduce the issue?

Give insert, but not modify permission on author.

Send a mutation query like:

mutation upsert_author {
  insert_author(
    objects: [
      { name: "John" }
    ],
    on_conflict: {
      constraint: author_name_key,
      update_columns: []
    }
  ) {
    affected_rows
  }
}

Get the above error.

Metadata

Metadata

Assignees

Labels

a/authzIssues related to "authorization" and the policy engine after session claims are procesedds-tenk/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions