You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/07/18 13:47:12 UTC

[GitHub] [incubator-superset] smacker opened a new pull request #7894: Set owner to dashboards and charts on import

smacker opened a new pull request #7894: Set owner to dashboards and charts on import
URL: https://github.com/apache/incubator-superset/pull/7894
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   
   This PR contains multiple changes to set an owner correctly on import. Incorrect owner causes an inability to modify (override) charts.
   
   #### Allow to pass user for dashboard import cli
   
   Dashboard import assigns a current user from flask context during import.
   But in the case of cli import, there is no flask user and imported charts
   don't have an owner which prevents the ability to edit them.
   
   #### Use ORM to decode dashboards json
   
   Creating instances using ORM allows normally work with relations (set the owner).
   
   #### Reset ownership on dashboard import
   
   For overriding existing charts it requires `owners` property to be set.
   
   ### TEST PLAN
   
   1. Import a dashboard using UI/CLI with `--username` flag
   2. Validate the dashboard and slices have correct `created_by`, `modified_by`, `owners` fields
   3. Validate the charts can be modified and saved with overriding
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   
   @mistercrunch 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org