mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
site replication: Disallow removal of site-replicator account (#19092)
This commit is contained in:
@@ -1072,6 +1072,10 @@ func (a adminAPIHandlers) DeleteServiceAccount(w http.ResponseWriter, r *http.Re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if serviceAccount == siteReplicatorSvcAcc && globalSiteReplicationSys.isEnabled() {
|
||||||
|
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidArgument), r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
// We do not care if service account is readable or not at this point,
|
// We do not care if service account is readable or not at this point,
|
||||||
// since this is a delete call we shall allow it to be deleted if possible.
|
// since this is a delete call we shall allow it to be deleted if possible.
|
||||||
svcAccount, _, err := globalIAMSys.GetServiceAccount(ctx, serviceAccount)
|
svcAccount, _, err := globalIAMSys.GetServiceAccount(ctx, serviceAccount)
|
||||||
|
|||||||
Reference in New Issue
Block a user