villebro opened a new pull request #16437:
URL: https://github.com/apache/superset/pull/16437


   ### SUMMARY
   Currently the Explore view does not update the "can_overwrite" permission 
when the user updates the chart ownership. In addition, the "Save" button in 
the chart metadata modal is enabled when the owners array is initially empty, 
but after adding and removing a user the save button gets disabled.
   
   This removes the `can_overwrite` property from the Explore bootstrap data 
and replaces it with state from Redux, making it possible to change the 
disabled state of the "Save (Overwrite)" button in the Save modal. In addition, 
the `slice.owners` property in bootstrap data is changed to provide numeric ids 
instead of "firstname lastname" (most other models were already returning 
owners in this format; it appears this wasn't being used anywhere in Explore).
   
   ### AFTER
   
https://user-images.githubusercontent.com/33317356/130752708-1ed4a830-f2d6-487d-a3d4-10a1fe283539.mp4
   
   ### BEFORE
   
https://user-images.githubusercontent.com/33317356/130752813-aeaa593c-94e2-48a8-9705-397048386cc2.mp4
   
   ### TESTING INSTRUCTIONS
   1. Login as Admin
   2. Open the Charts page and edit the metadata of an example dataset that 
doesn't have any owners
   3. Add and remove yourself as owner and notice how the Save button goes from 
being enabled to disabled without the owners changing. Click cancel.
   4. Open an example chart in Explore that doesn't have any owners
   5. Add yourself as an owner
   6. Try to overwrite the chart - notice that the "Save (Overwrite)" radio 
button is disabled
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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