Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Superset role definition #2749

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bilder/images/superset/files/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
superset-init:
image: *superset-image
container_name: superset_init
command: ["superset", "db", "upgrade"]
command: ["sh", "-c", "superset db upgrade && superset fab import-roles -p /app/pythonpath/roles.json"]
env_file: .env
volumes: *superset-volumes
healthcheck:
Expand Down
71 changes: 71 additions & 0 deletions src/ol_superset/pythonpath/roles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
{
"name":"OL Read Only",
"permissions":[
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"SavedQuery"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"ReportSchedule"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"Chart"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"Dataset"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"Dashboard"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"Database"
}
},
{
"permission":{
"name":"can_read"
},
"view_menu":{
"name":"Query"
}
},
{
"permission":{
"name":"can_dashboard"
},
"view_menu":{
"name":"Superset"
}
}
]
}
]