fix_项目设置-项目管理员添加用户组失败,提示403_Forbidden --bug=1007930 --user=王孝刚 【项目设置】-项目管理员添加用户组失败,提示403 Forbidden https://www.tapd.cn/55049933/s/1067623
This commit is contained in:
parent
c06a439e3d
commit
427bfa6a4a
|
@ -84,6 +84,7 @@ public class PermissionConstants {
|
|||
public static final String PROJECT_GROUP_READ_CREATE = "PROJECT_GROUP:READ+CREATE";
|
||||
public static final String PROJECT_GROUP_READ_EDIT = "PROJECT_GROUP:READ+EDIT";
|
||||
public static final String PROJECT_GROUP_READ_DELETE = "PROJECT_GROUP:READ+DELETE";
|
||||
public static final String PROJECT_GROUP_READ_SETTING_PERMISSION = "PROJECT_GROUP:READ+SETTING_PERMISSION";
|
||||
|
||||
public static final String PROJECT_ENVIRONMENT_READ = "PROJECT_ENVIRONMENT:READ";
|
||||
public static final String PROJECT_ENVIRONMENT_READ_CREATE = "PROJECT_ENVIRONMENT:READ+CREATE";
|
||||
|
|
|
@ -53,7 +53,7 @@ public class GroupController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_CREATE}, logical = Logical.OR)
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_CREATE , PermissionConstants.PROJECT_GROUP_READ_CREATE}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.CREATE, content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
public Group addGroup(@RequestBody EditGroupRequest request) {
|
||||
request.setId(UUID.randomUUID().toString());
|
||||
|
@ -61,14 +61,14 @@ public class GroupController {
|
|||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_EDIT}, logical = Logical.OR)
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_EDIT , PermissionConstants.PROJECT_GROUP_READ_EDIT}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id)", content = "#msClass.getLogDetails(#request.id)", msClass = GroupService.class)
|
||||
public void editGroup(@RequestBody EditGroupRequest request) {
|
||||
groupService.editGroup(request);
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_DELETE}, logical = Logical.OR)
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_DELETE , PermissionConstants.PROJECT_GROUP_READ_DELETE}, logical = Logical.OR)
|
||||
@MsAuditLog(module = "group_permission", type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = GroupService.class)
|
||||
public void deleteGroup(@PathVariable String id) {
|
||||
groupService.deleteGroup(id);
|
||||
|
@ -80,7 +80,7 @@ public class GroupController {
|
|||
}
|
||||
|
||||
@PostMapping("/permission/edit")
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_SETTING_PERMISSION}, logical = Logical.OR)
|
||||
@RequiresPermissions(value={PermissionConstants.SYSTEM_GROUP_READ_SETTING_PERMISSION , PermissionConstants.PROJECT_GROUP_READ_SETTING_PERMISSION}, logical = Logical.OR)
|
||||
public void editGroupPermission(@RequestBody EditGroupRequest editGroupRequest) {
|
||||
groupService.editGroupPermission(editGroupRequest);
|
||||
}
|
||||
|
|
|
@ -447,6 +447,23 @@ export const TEST_PLAN_STATUS = {
|
|||
}
|
||||
};
|
||||
|
||||
export const TEST_PLAN_REPORT_STATUS = {
|
||||
key: "status",
|
||||
name: 'MsTableSearchSelect',
|
||||
label: "test_track.plan.plan_status",
|
||||
operator: {
|
||||
options: [OPERATORS.IN, OPERATORS.NOT_IN]
|
||||
},
|
||||
options: [
|
||||
{label: 'Starting', value: 'Starting'},
|
||||
{label: 'Running', value: 'Underway'},
|
||||
{label: 'Completed', value: 'Completed'}
|
||||
],
|
||||
props: {
|
||||
multiple: true
|
||||
}
|
||||
};
|
||||
|
||||
export const TEST_PLAN_TRIGGER_MODE = {
|
||||
key: "triggerMode",
|
||||
name: 'MsTableSearchSelect',
|
||||
|
@ -496,7 +513,7 @@ export const API_CASE_CONFIGS = [NAME, API_CASE_PRIORITY, API_TAGS, API_CASE_RES
|
|||
|
||||
export const API_SCENARIO_CONFIGS = [NAME, API_CASE_PRIORITY, API_TAGS, API_SCENARIO_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR];
|
||||
|
||||
export const TEST_PLAN_REPORT_CONFIGS = [NAME, TEST_PLAN_NAME,CREATOR, CREATE_TIME, TEST_PLAN_TRIGGER_MODE, TEST_PLAN_STATUS];
|
||||
export const TEST_PLAN_REPORT_CONFIGS = [NAME, TEST_PLAN_NAME,CREATOR, CREATE_TIME, TEST_PLAN_TRIGGER_MODE, TEST_PLAN_REPORT_STATUS];
|
||||
|
||||
// 测试计划 功能用例
|
||||
export const TEST_PLAN_TEST_CASE_CONFIGS = [NAME, API_TAGS, MODULE, PRIORITY, CREATE_TIME, UPDATE_TIME, EXECUTOR, CASE_REVIEW_STATUS];
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<el-col :span="11" :offset="2">
|
||||
<el-form-item :label="$t('group.type')" prop="type">
|
||||
<el-select v-model="form.type" :placeholder="$t('group.select_type')" style="width: 100%"
|
||||
@change="changeGroup" disabled>
|
||||
disabled>
|
||||
<el-option :label="$t('group.system')" value="SYSTEM"></el-option>
|
||||
<el-option :label="$t('group.workspace')" value="WORKSPACE"></el-option>
|
||||
<el-option :label="$t('group.project')" value="PROJECT"></el-option>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<el-input type="textarea" v-model="form.description"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('group.global_group')">
|
||||
<el-switch v-model="form.global" :disabled="dialogType === 'edit' || form.type === 'SYSTEM'"
|
||||
<el-switch v-model="form.global" :disabled="dialogType === 'edit'"
|
||||
@change="change(form.global)"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -97,10 +97,6 @@ export default {
|
|||
this.edit();
|
||||
}
|
||||
|
||||
if (this.dialogType === 'copy') {
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
create() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
|
@ -135,15 +131,6 @@ export default {
|
|||
this.dialogVisible = true;
|
||||
this.dialogType = type;
|
||||
this.form = Object.assign({type: 'PROJECT' ,global: false , scopeId: getCurrentWorkspaceId()}, row);
|
||||
if (type !== 'create') {
|
||||
if (this.form.type === GROUP_SYSTEM) {
|
||||
this.form.global = true;
|
||||
this.show = false;
|
||||
} else {
|
||||
this.form.global = true;
|
||||
this.show = !this.form.global;
|
||||
}
|
||||
}
|
||||
this.getWorkspace();
|
||||
},
|
||||
cancel() {
|
||||
|
@ -163,7 +150,7 @@ export default {
|
|||
this.show = this.isSystem ? false : !global;
|
||||
} else {
|
||||
this.form.global = false;
|
||||
this.$warning(this.$t('group.group_global_warning'))
|
||||
this.$warning(this.$t('group.ws_admin_global'))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -692,7 +692,8 @@ export default {
|
|||
check_all: 'ALL',
|
||||
permission: 'Permission',
|
||||
please_select_group: 'Please Select Group',
|
||||
global: 'Global'
|
||||
global: 'Global',
|
||||
ws_admin_global: 'Only workspace administrators can create global user groups'
|
||||
},
|
||||
role: {
|
||||
please_choose_role: 'Please Choose Role',
|
||||
|
|
|
@ -697,7 +697,8 @@ export default {
|
|||
check_all: '全选',
|
||||
permission: '权限',
|
||||
please_select_group: '请选择用户组',
|
||||
global: '全局'
|
||||
global: '全局',
|
||||
ws_admin_global: '工作空间管理员才可以创建全局用户组'
|
||||
},
|
||||
role: {
|
||||
please_choose_role: '请选择角色',
|
||||
|
|
|
@ -696,7 +696,8 @@ export default {
|
|||
check_all: '全選',
|
||||
permission: '權限',
|
||||
please_select_group: '請選擇用戶組',
|
||||
global: '全局'
|
||||
global: '全局',
|
||||
ws_admin_global: '工作空間管理員才可以創建全域用戶組'
|
||||
},
|
||||
role: {
|
||||
please_choose_role: '請選擇角色',
|
||||
|
|
Loading…
Reference in New Issue