hasura / hasura/graphql-engine

Except admin role, user role can't access and view postgresql custom mutation function.

Open
#8,047 15 comments 6 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: 2.1.1
CLI Version (for CLI related issue):

### Environment
Kubernetes

### What is the expected behaviour?

Normal user role can access mutation function by table access permission.
But except admin role can't see and access mutation function.

Ref.
https://github.com/hasura/graphql-engine/issues/6503

### Keywords

HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS=false

### What is the current behaviour?

Add conf to below config. Then allow permission manually, it's work.

HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS=false

### How to reproduce the issue?

1. With out HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS=false run K8S pod.
2. Add volatile PostgreSQL function to db(using hasura SQL Editor)
3. Allow permission to role(common_user) Table permission all(Select, update, delete...)
4. Check Hasura Web UI with x-hasura-role="common_user"
5. Not showing new function at mutation list.
6. Uncheck x-hasura-role, admin access we can see the function at mutation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.