fix: 修改系统参数只允许系统管理员操作

This commit is contained in:
Captain.B 2020-07-21 10:41:01 +08:00
parent 52b0b93510
commit 801ee5edd5
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import io.metersphere.commons.constants.ParamConstants;
import io.metersphere.commons.constants.RoleConstants;
import io.metersphere.ldap.domain.LdapInfo;
import io.metersphere.service.SystemParameterService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.*;
@ -30,6 +31,7 @@ public class SystemParameterController {
}
@GetMapping("/version")
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
public String getVersion() {
return SystemParameterService.getVersion();
}