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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user