cube-js / cube-js/cube

Role based schema selection

Open
#847 3 comments 0 reactions 0 assignees View on GitHub
backend:server
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Is your feature request related to a problem? Please describe.**
Since we have many different types of users on our system and the users have different needs and most importantly different permissions, a one schema fits all approach is very hard to accomplish. A simple example are the roles of an analyst and a normal user. The normal user should only be able to see her/his data (enforced row level security) and the data analyst should see all the uses data.

**Describe the solution you'd like**
It would be great if it was possible to include a "role" key into the JWT that decides on which version of schema is used. The different versions of the could be differentiated ether by putting them into different folders oder appending the role name to the cube names.

**Describe alternatives you've considered**
I'm currently working around this by using complicated where clauses in my cubes.

**Additional context**
none

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.