healchow commented on code in PR #7301:
URL: https://github.com/apache/inlong/pull/7301#discussion_r1092770067
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java:
##########
@@ -146,7 +146,7 @@ public Integer saveTag(ClusterTagRequest request, String
operator) {
@Override
public Integer saveTag(ClusterTagRequest request, UserInfo opInfo) {
// only the person in charges can query
- if (!opInfo.getRoles().contains(UserTypeEnum.ADMIN.name())) {
+ if (!opInfo.getAccountType().equals(UserTypeEnum.ADMIN.getCode())) {
Review Comment:
Semantically, account type has less meaning than user role. It is more
common to manage permissions based on user roles.
So I think this change is not a good practice.
--
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]