fix(系统设置): 接口定义页面权限问题
--bug=1016064 --user=李玉号 【系统设置】权限管理,有接口定义查询和执行的权限,进入接口测试模块会跳到个人信息页面 https://www.tapd.cn/55049933/s/1232528
This commit is contained in:
parent
04bcd6bc37
commit
564840def2
|
@ -3,6 +3,7 @@ package io.metersphere.api.controller;
|
||||||
import io.metersphere.api.service.ApiDefinitionEnvService;
|
import io.metersphere.api.service.ApiDefinitionEnvService;
|
||||||
import io.metersphere.base.domain.ApiDefinitionEnv;
|
import io.metersphere.base.domain.ApiDefinitionEnv;
|
||||||
import io.metersphere.commons.constants.PermissionConstants;
|
import io.metersphere.commons.constants.PermissionConstants;
|
||||||
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ public class ApiDefinitionEnvController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/create")
|
@PostMapping(value = "/create")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API)
|
@RequiresPermissions(value = {PermissionConstants.PROJECT_API_DEFINITION_READ_CREATE_API, PermissionConstants.PROJECT_API_DEFINITION_READ}, logical = Logical.OR)
|
||||||
public void create(@RequestBody ApiDefinitionEnv request) {
|
public void create(@RequestBody ApiDefinitionEnv request) {
|
||||||
apiDefinitionEnvService.insert(request);
|
apiDefinitionEnvService.insert(request);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue