Added validation for users to not delete their own account (#633)

Also Implemented an option to show / hide actions in table wrapper

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
Alex
2021-03-08 23:38:19 -06:00
committed by GitHub
parent ebab2e1648
commit 81087ae910
15 changed files with 77 additions and 16 deletions

View File

@@ -197,6 +197,10 @@ func getRemoveUserResponse(session *models.Principal, params admin_api.RemoveUse
return prepareError(err)
}
if session.AccountAccessKey == params.Name {
return prepareError(errAvoidSelfAccountDelete)
}
// create a minioClient interface implementation
// defining the client to be used
adminClient := adminClient{client: mAdmin}