hasura / hasura/graphql-engine

Cannot update Row Select Permission Custom Check for roles included in an inherited role

Open
#7,556 4 comments 2 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: v2.0.8

### Environment
OSS

### What is the expected behaviour?

When I update the custom checks for a role included in an inherited role, the update should work without errors.

### Keywords
- the following parent role(s) are not found
- which are required to construct the inherited role

### What is the current behaviour?

We receive the following error:
```json
{
"path": "$.args[0].args",
"error": "the following parent role(s) are not found: which are required to construct the inherited role: \"\"",
"code": "not-exists"
}
```

### How to reproduce the issue?

1. Create a user role, add some custom checks
2. Create an inherited role and use the user role created at step 1)
3. Try to update Row Select Permission Custom Check of the role created at step 1)

### Screenshots or Screencast

![image](https://user-images.githubusercontent.com/7108834/133433308-6915042a-2d9e-4f2f-8cab-2bca69c16f60.png)

### Please provide any traces or logs that could help here.

```json
{
"path": "$.args[0].args",
"error": "the following parent role(s) are not found: which are required to construct the inherited role: \"\"",
"code": "not-exists"
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the role-update operation used to update Row Select Permission Custom Checks, then reproduce the three-step inherited-role scenario. Done means the custom-check update succeeds without the reported not-exists error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.