You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "vernedeng (via GitHub)" <gi...@apache.org> on 2023/06/09 06:16:31 UTC

[GitHub] [inlong] vernedeng opened a new pull request, #8201: [INLONG-8200][Manager] Add tenant permission filter

vernedeng opened a new pull request, #8201:
URL: https://github.com/apache/inlong/pull/8201

   
   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   - Title Example: [INLONG-XYZ][Component] Title of the pull request
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
   
   - Fixes #8200 
   - Parent #7914 
   
   ### Motivation
   
   Fliter out requests which user has no permission to the specific tenant
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224024951


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/tenant/TenantAuthenticatingFilter.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.web.auth.tenant;
+
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.pojo.user.UserInfo;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+
+import static org.apache.inlong.common.util.BasicAuth.BASIC_AUTH_TENANT_HEADER;
+
+@Slf4j

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1223924151


##########
inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongUserRoleEntityMapper.java:
##########
@@ -30,6 +30,8 @@ public interface InlongUserRoleEntityMapper {
 
     InlongUserRoleEntity selectById(Integer id);
 
+    InlongUserRoleEntity selectByName(String userName);

Review Comment:
   `userName` -> `username`
   
   At the same time, `selectByUsername` may be more accurate to prevent the meaning of `selectByName` from being unclear when adding other fields such as `role_name` and `tenant_name` in the subsequent DB.



##########
inlong-manager/manager-dao/src/main/resources/mappers/TenantUserRoleEntityMapper.xml:
##########
@@ -91,4 +90,13 @@
         from tenant_user_role
         where id = #{id,jdbcType=INTEGER}
     </delete>
+    
+    <select id="selectByNameAndTenant" parameterType="java.lang.String" resultMap="BaseResultMap">

Review Comment:
   ditto



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/tenant/InlongTenantServiceImpl.java:
##########
@@ -45,6 +45,9 @@ public class InlongTenantServiceImpl implements InlongTenantService {
     @Override
     public InlongTenantInfo get(String name) {
         InlongTenantEntity entity = inlongTenantEntityMapper.selectByName(name);
+        if (entity == null) {
+            return null;

Review Comment:
   Do we need some warn or error logs here?



##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/tenant/TenantAuthenticatingRealm.java:
##########
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.web.auth.tenant;
+
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.pojo.tenant.InlongTenantInfo;
+import org.apache.inlong.manager.pojo.user.InlongRoleInfo;
+import org.apache.inlong.manager.pojo.user.TenantRoleInfo;
+import org.apache.inlong.manager.pojo.user.UserInfo;
+import org.apache.inlong.manager.service.tenant.InlongTenantService;
+import org.apache.inlong.manager.service.user.InlongRoleService;
+import org.apache.inlong.manager.service.user.LoginUserUtils;
+import org.apache.inlong.manager.service.user.TenantRoleService;
+import org.apache.inlong.manager.service.user.UserService;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authc.AuthenticationInfo;
+import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.SimpleAuthenticationInfo;
+import org.apache.shiro.realm.AuthenticatingRealm;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Slf4j
+public class TenantAuthenticatingRealm extends AuthenticatingRealm {

Review Comment:
   javadocs, please.



##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/tenant/TenantAuthenticatingFilter.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.web.auth.tenant;
+
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.pojo.user.UserInfo;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+
+import static org.apache.inlong.common.util.BasicAuth.BASIC_AUTH_TENANT_HEADER;
+
+@Slf4j

Review Comment:
   Add some javadocs, please.



##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/InlongShiroImpl.java:
##########
@@ -135,4 +156,17 @@ public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdviso
         authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
         return authorizationAttributeSourceAdvisor;
     }
+
+    private String genFiltersInOrder(String... filterNames) {
+        if (filterNames.length == 1) {
+            return filterNames[0];
+        }
+
+        StringBuilder sb = new StringBuilder();

Review Comment:
   `sb` -> `builder`



##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/tenant/TenantToken.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.web.auth.tenant;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import org.apache.shiro.authc.AuthenticationToken;
+
+@Data
+@AllArgsConstructor
+public class TenantToken implements AuthenticationToken {

Review Comment:
   javadocs, please.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224226010


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongTenantController.java:
##########
@@ -50,7 +50,7 @@ public class InlongTenantController {
     @ApiOperation(value = "Get tenant")
     @ApiImplicitParam(name = "name", dataTypeClass = String.class, required = true)
     public Response<InlongTenantInfo> get(@PathVariable String name) {
-        return Response.success(tenantService.get(name));

Review Comment:
   Please add delete method and add user authentication in `InlongTenantController`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224023901


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/auth/InlongShiroImpl.java:
##########
@@ -135,4 +156,17 @@ public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdviso
         authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
         return authorizationAttributeSourceAdvisor;
     }
+
+    private String genFiltersInOrder(String... filterNames) {
+        if (filterNames.length == 1) {
+            return filterNames[0];
+        }
+
+        StringBuilder sb = new StringBuilder();

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1223990904


##########
inlong-manager/manager-dao/src/main/resources/mappers/TenantUserRoleEntityMapper.xml:
##########
@@ -91,4 +90,13 @@
         from tenant_user_role
         where id = #{id,jdbcType=INTEGER}
     </delete>
+    
+    <select id="selectByNameAndTenant" parameterType="java.lang.String" resultMap="BaseResultMap">

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224152100


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java:
##########
@@ -167,15 +167,15 @@ public UserInfo getById(Integer userId, String currentUser) {
         result.setAccountType(entity.getAccountType());
         result.setVersion(entity.getVersion());
 
-        if (StringUtils.isNotBlank(entity.getSecretKey()) && StringUtils.isNotBlank(entity.getPublicKey())) {
+        if (StringUtils.isNotBlank(entity.getSecretKey())/* && StringUtils.isNotBlank(entity.getPublicKey()) */) {

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224010747


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/tenant/InlongTenantServiceImpl.java:
##########
@@ -45,6 +45,9 @@ public class InlongTenantServiceImpl implements InlongTenantService {
     @Override
     public InlongTenantInfo get(String name) {
         InlongTenantEntity entity = inlongTenantEntityMapper.selectByName(name);
+        if (entity == null) {
+            return null;

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow merged pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow merged PR #8201:
URL: https://github.com/apache/inlong/pull/8201


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1223990007


##########
inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongUserRoleEntityMapper.java:
##########
@@ -30,6 +30,8 @@ public interface InlongUserRoleEntityMapper {
 
     InlongUserRoleEntity selectById(Integer id);
 
+    InlongUserRoleEntity selectByName(String userName);

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224051755


##########
inlong-manager/manager-dao/src/main/resources/mappers/InlongTenantEntityMapper.xml:
##########
@@ -97,7 +97,6 @@
   <update id="updateById" parameterType="org.apache.inlong.manager.dao.entity.InlongTenantEntity">
     update inlong_tenant
     set description  = #{description,jdbcType=VARCHAR},
-        is_deleted   = #{isDeleted, jdbcType=INTEGER},

Review Comment:
   Please add delete interface for inlong tenant.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224150325


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java:
##########
@@ -167,15 +167,15 @@ public UserInfo getById(Integer userId, String currentUser) {
         result.setAccountType(entity.getAccountType());
         result.setVersion(entity.getVersion());
 
-        if (StringUtils.isNotBlank(entity.getSecretKey()) && StringUtils.isNotBlank(entity.getPublicKey())) {
+        if (StringUtils.isNotBlank(entity.getSecretKey())/* && StringUtils.isNotBlank(entity.getPublicKey()) */) {
             try {
                 // decipher according to stored key version
                 // note that if the version is null then the string is treated as unencrypted plain text
                 Integer version = entity.getEncryptVersion();
                 byte[] secretKeyBytes = AESUtils.decryptAsString(entity.getSecretKey(), version);
-                byte[] publicKeyBytes = AESUtils.decryptAsString(entity.getPublicKey(), version);
+                // byte[] publicKeyBytes = AESUtils.decryptAsString(entity.getPublicKey(), version);

Review Comment:
   ` byte[] publicKeyBytes = AESUtils.decryptAsString(entity.getPublicKey(), version);`



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java:
##########
@@ -167,15 +167,15 @@ public UserInfo getById(Integer userId, String currentUser) {
         result.setAccountType(entity.getAccountType());
         result.setVersion(entity.getVersion());
 
-        if (StringUtils.isNotBlank(entity.getSecretKey()) && StringUtils.isNotBlank(entity.getPublicKey())) {
+        if (StringUtils.isNotBlank(entity.getSecretKey())/* && StringUtils.isNotBlank(entity.getPublicKey()) */) {
             try {
                 // decipher according to stored key version
                 // note that if the version is null then the string is treated as unencrypted plain text
                 Integer version = entity.getEncryptVersion();
                 byte[] secretKeyBytes = AESUtils.decryptAsString(entity.getSecretKey(), version);
-                byte[] publicKeyBytes = AESUtils.decryptAsString(entity.getPublicKey(), version);
+                // byte[] publicKeyBytes = AESUtils.decryptAsString(entity.getPublicKey(), version);
                 result.setSecretKey(new String(secretKeyBytes, StandardCharsets.UTF_8));
-                result.setPublicKey(new String(publicKeyBytes, StandardCharsets.UTF_8));
+                // result.setPublicKey(new String(publicKeyBytes, StandardCharsets.UTF_8));

Review Comment:
   `result.setPublicKey(new String(publicKeyBytes, StandardCharsets.UTF_8));`



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224148463


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java:
##########
@@ -167,15 +167,15 @@ public UserInfo getById(Integer userId, String currentUser) {
         result.setAccountType(entity.getAccountType());
         result.setVersion(entity.getVersion());
 
-        if (StringUtils.isNotBlank(entity.getSecretKey()) && StringUtils.isNotBlank(entity.getPublicKey())) {
+        if (StringUtils.isNotBlank(entity.getSecretKey())/* && StringUtils.isNotBlank(entity.getPublicKey()) */) {

Review Comment:
   `StringUtils.isNotBlank(entity.getSecretKey()) && StringUtils.isNotBlank(entity.getPublicKey()`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] vernedeng commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224165885


##########
inlong-manager/manager-dao/src/main/resources/mappers/InlongTenantEntityMapper.xml:
##########
@@ -97,7 +97,6 @@
   <update id="updateById" parameterType="org.apache.inlong.manager.dao.entity.InlongTenantEntity">
     update inlong_tenant
     set description  = #{description,jdbcType=VARCHAR},
-        is_deleted   = #{isDeleted, jdbcType=INTEGER},

Review Comment:
   fixed, thx



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8201: [INLONG-8200][Manager] Add tenant permission filter

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8201:
URL: https://github.com/apache/inlong/pull/8201#discussion_r1224226010


##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongTenantController.java:
##########
@@ -50,7 +50,7 @@ public class InlongTenantController {
     @ApiOperation(value = "Get tenant")
     @ApiImplicitParam(name = "name", dataTypeClass = String.class, required = true)
     public Response<InlongTenantInfo> get(@PathVariable String name) {
-        return Response.success(tenantService.get(name));

Review Comment:
   Please add delete method in `InlongTenantController`



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org