smengcl commented on code in PR #3854:
URL: https://github.com/apache/ozone/pull/3854#discussion_r997598165
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantAssignAdminRequest.java:
##########
@@ -116,6 +116,13 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
OMException.ResultCodes.INVALID_TENANT_ID);
}
+ // Prevent assigning the same user as admin.
+ if (accessIdInfo.getIsAdmin()) {
+ throw new OMException("accessId '" + accessId +
+ "' is already the tenant '" + tenantId + "' admin.",
Review Comment:
```suggestion
"' is already a tenant admin of '" + tenantId + "'.",
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]