fix: 修复user-keys-controller没加权限的问题
This commit is contained in:
parent
d3fea8fe57
commit
ebe0fdf2d9
|
@ -1,9 +1,12 @@
|
||||||
package io.metersphere.controller;
|
package io.metersphere.controller;
|
||||||
|
|
||||||
import io.metersphere.base.domain.UserKey;
|
import io.metersphere.base.domain.UserKey;
|
||||||
|
import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
import io.metersphere.security.ApiKeyHandler;
|
import io.metersphere.security.ApiKeyHandler;
|
||||||
import io.metersphere.service.UserKeyService;
|
import io.metersphere.service.UserKeyService;
|
||||||
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.apache.shiro.web.util.WebUtils;
|
import org.apache.shiro.web.util.WebUtils;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
@ -16,6 +19,7 @@ import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("user/key")
|
@RequestMapping("user/key")
|
||||||
|
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||||
public class UserKeysController {
|
public class UserKeysController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
|
|
Loading…
Reference in New Issue