Add DeleteUser() to generate events in etcd (#7804)

Fixes a regression introduced in 6d89435356

Fixes #7797
This commit is contained in:
Harshavardhana 2019-06-18 15:44:23 -07:00 committed by GitHub
parent 299ef9b188
commit cd7d5b59e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -940,6 +940,12 @@ func (a adminAPIHandlers) RemoveUser(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
accessKey := vars["accessKey"]
if err := globalIAMSys.DeleteUser(accessKey); err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
return
}
// Notify all other MinIO peers to delete user.
for _, nerr := range globalNotificationSys.DeleteUser(accessKey) {
if nerr.Err != nil {