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


   ### SUMMARY
   Currently it is impossible for users to remove themselves from the list of 
users. This is to avoid the risk of a user mistakenly being "locked out" of a 
chart/dashboard/etc. This can be inconvenient if an admin edits an object, as 
they automatically become owners of the edited object.
   
   This PR changes the logic as follows:
   - If an admin is editing an object, they can remove themselves from the list 
of owners.
   
   The following is unchanged:
   - When a user (admins included) creates an object, they become the owner of 
the object.
   - When a non-admin edits an object and removes themselves from the list of 
owners, they are automatically re-added as owners. In other words, non-admin 
users have to be removed from the list of owners by an admin.
   
   ### BEFORE
   Currently an admin is unable to remove themselves from the list of ownersĂ–
   
https://user-images.githubusercontent.com/33317356/121895878-5fd3c780-cd29-11eb-875b-273c323fc17e.mp4
   
   ### AFTER
   Now the admin can remove themselves from the owners:
   
https://user-images.githubusercontent.com/33317356/121895941-72e69780-cd29-11eb-988e-2ebea36a6c04.mp4
   
   ### TESTING INSTRUCTIONS
   - Log in as admin
   - try to remove yourself from the list of owners
   - refresh the page, notice that "Admin" is again an owner
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] 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.

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