Skip to content

Commit

Permalink
Merge pull request #2784 from alibaba/revert-2783-feature_tenant_verify
Browse files Browse the repository at this point in the history
Revert "[#2738]add tenant legality verification."
  • Loading branch information
yanlinly authored May 11, 2020
2 parents 99a74d7 + 9f4061e commit 5319b27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3,600 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.common.model.RestResult;
import com.alibaba.nacos.config.server.utils.ParamUtils;
import com.alibaba.nacos.config.server.auth.ConfigResourceParser;
import com.alibaba.nacos.config.server.constant.Constants;
import com.alibaba.nacos.config.server.controller.parameters.SameNamespaceCloneConfigBean;
Expand Down Expand Up @@ -136,8 +135,6 @@ public Boolean publishConfig(HttpServletRequest request, HttpServletResponse res
throws NacosException {
final String srcIp = RequestUtil.getRemoteIp(request);
String requestIpApp = RequestUtil.getAppName(request);
// check tenant
ParamUtils.checkTenant(tenant);
ParamUtils.checkParam(dataId, group, "datumId", content);
ParamUtils.checkParam(tag);

Expand Down Expand Up @@ -216,9 +213,7 @@ public void getConfig(HttpServletRequest request, HttpServletResponse response,
@RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant,
@RequestParam(value = "tag", required = false) String tag)
throws IOException, ServletException, NacosException {
// check tenant
ParamUtils.checkTenant(tenant);
tenant = processTenant(tenant);
tenant = processTenant(tenant);
// check params
ParamUtils.checkParam(dataId, group, "datumId", "content");
ParamUtils.checkParam(tag);
Expand All @@ -239,9 +234,7 @@ public ConfigAllInfo detailConfigInfo(HttpServletRequest request,
@RequestParam("group") String group,
@RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant)
throws NacosException {
// check tenant
ParamUtils.checkTenant(tenant);
// check params
// check params
ParamUtils.checkParam(dataId, group, "datumId", "content");
return persistService.findConfigAllInfo(dataId, group, tenant);
}
Expand All @@ -260,9 +253,7 @@ public Boolean deleteConfig(HttpServletRequest request, HttpServletResponse resp
@RequestParam(value = "tenant", required = false, defaultValue = StringUtils.EMPTY) String tenant,
@RequestParam(value = "tag", required = false) String tag)
throws NacosException {
// check tenant
ParamUtils.checkTenant(tenant);
ParamUtils.checkParam(dataId, group, "datumId", "rm");
ParamUtils.checkParam(dataId, group, "datumId", "rm");
ParamUtils.checkParam(tag);
String clientIp = RequestUtil.getRemoteIp(request);
if (StringUtils.isBlank(tag)) {
Expand Down
Loading

0 comments on commit 5319b27

Please sign in to comment.