jhult commented on issue #16066:
URL: https://github.com/apache/superset/issues/16066#issuecomment-961295375


   I created a little script to export roles (and pretty it up). I'm using 
Docker and [Prettier](https://prettier.io/docs/en/install.html) (for nice JSON 
formatting and git diffing) but you could pretty easily alter this script to 
strip out (or ignore) those parts:
   
   ```
   #!/bin/bash
   
   # Run from machine where container/app is running
   
   # May need to first do these 2 first, otherwise flask may not run
   # docker exec -it superset_app pip install Jinja2==2.11.3
   # docker exec -it superset_app pip install jsonschema==3.2.0
   
   OUTPUT_FILE=roles_export.json
   OUTPUT_PATH=/app/$OUTPUT_FILE
   docker exec -it superset_app flask fab export-roles -path $OUTPUT_PATH
   docker cp superset_app:$OUTPUT_PATH .
   
   # May need to install prettier if it is not already installed
   # npm install -g prettier
   prettier $OUTPUT_FILE --write
   ```
   
   This script is [Unlicensed](https://spdx.org/licenses/Unlicense.html) and 
thus is free and unencumbered software released into the public domain.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to