fix(测试跟踪): 添加脑图操作权限
--bug=1019436 --user=宋昌昌 【测试跟踪】github#19495用户角色没有分配删除测试用例的权限,在列表模式用户没有删除按钮,但是在脑图模式下,该用户还是可以删除测试用例 https://www.tapd.cn/55049933/s/1348930
This commit is contained in:
parent
857bfefa9d
commit
94a198831a
|
@ -2896,6 +2896,7 @@ const message = {
|
||||||
import: "IMPORT",
|
import: "IMPORT",
|
||||||
export: "EXPORT",
|
export: "EXPORT",
|
||||||
recover: "RECOVER",
|
recover: "RECOVER",
|
||||||
|
minder_operate: "OPERATE MINDER",
|
||||||
},
|
},
|
||||||
project_track_review: {
|
project_track_review: {
|
||||||
name: "Review",
|
name: "Review",
|
||||||
|
|
|
@ -2796,6 +2796,7 @@ const message = {
|
||||||
import: "导入用例",
|
import: "导入用例",
|
||||||
export: "导出用例",
|
export: "导出用例",
|
||||||
recover: "恢复用例",
|
recover: "恢复用例",
|
||||||
|
minder_operate: "操作脑图",
|
||||||
},
|
},
|
||||||
project_track_review: {
|
project_track_review: {
|
||||||
name: "测试评审",
|
name: "测试评审",
|
||||||
|
|
|
@ -2793,6 +2793,7 @@ const message = {
|
||||||
import: "導入用例",
|
import: "導入用例",
|
||||||
export: "導出用例",
|
export: "導出用例",
|
||||||
recover: "恢復用例",
|
recover: "恢復用例",
|
||||||
|
minder_operate: "操作腦圖",
|
||||||
},
|
},
|
||||||
project_track_review: {
|
project_track_review: {
|
||||||
name: "測試評審",
|
name: "測試評審",
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class PermissionConstants {
|
||||||
public static final String PROJECT_TRACK_CASE_READ_CREATE = "PROJECT_TRACK_CASE:READ+CREATE";
|
public static final String PROJECT_TRACK_CASE_READ_CREATE = "PROJECT_TRACK_CASE:READ+CREATE";
|
||||||
public static final String PROJECT_TRACK_CASE_READ_EDIT = "PROJECT_TRACK_CASE:READ+EDIT";
|
public static final String PROJECT_TRACK_CASE_READ_EDIT = "PROJECT_TRACK_CASE:READ+EDIT";
|
||||||
public static final String PROJECT_TRACK_CASE_READ_DELETE = "PROJECT_TRACK_CASE:READ+DELETE";
|
public static final String PROJECT_TRACK_CASE_READ_DELETE = "PROJECT_TRACK_CASE:READ+DELETE";
|
||||||
|
public static final String PROJECT_TRACK_CASE_MINDER_OPERATE = "PROJECT_TRACK_CASE_MINDER:OPERATE";
|
||||||
public static final String PROJECT_TRACK_CASE_READ_COPY = "PROJECT_TRACK_CASE:READ+COPY";
|
public static final String PROJECT_TRACK_CASE_READ_COPY = "PROJECT_TRACK_CASE:READ+COPY";
|
||||||
public static final String PROJECT_TRACK_CASE_READ_IMPORT = "PROJECT_TRACK_CASE:READ+IMPORT";
|
public static final String PROJECT_TRACK_CASE_READ_IMPORT = "PROJECT_TRACK_CASE:READ+IMPORT";
|
||||||
public static final String PROJECT_TRACK_CASE_READ_EXPORT = "PROJECT_TRACK_CASE:READ+EXPORT";
|
public static final String PROJECT_TRACK_CASE_READ_EXPORT = "PROJECT_TRACK_CASE:READ+EXPORT";
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||||
|
|
||||||
|
-- 测试计划相关的索引
|
||||||
|
CREATE INDEX api_case_id_IDX ON test_plan_api_case (api_case_id);
|
||||||
|
CREATE INDEX test_id_IDX ON test_case_test (test_id);
|
||||||
|
|
||||||
|
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
|
@ -0,0 +1,12 @@
|
||||||
|
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||||
|
|
||||||
|
-- 同时存在用例编辑和用例删除的用户组赋予脑图操作的权限
|
||||||
|
INSERT INTO user_group_permission
|
||||||
|
SELECT UUID(), group_id, 'PROJECT_TRACK_CASE_MINDER:OPERATE', 'PROJECT_TRACK_CASE' FROM(
|
||||||
|
SELECT group_id, count(permission_id) as permissionCount FROM user_group_permission
|
||||||
|
WHERE permission_id in ('PROJECT_TRACK_CASE:READ+EDIT', 'PROJECT_TRACK_CASE:READ+DELETE')
|
||||||
|
GROUP BY group_id
|
||||||
|
HAVING permissionCount = 2
|
||||||
|
) group_tmp;
|
||||||
|
|
||||||
|
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
|
@ -25,6 +25,11 @@
|
||||||
"name": "permission.project_track_case.delete",
|
"name": "permission.project_track_case.delete",
|
||||||
"resourceId": "PROJECT_TRACK_CASE"
|
"resourceId": "PROJECT_TRACK_CASE"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "PROJECT_TRACK_CASE_MINDER:OPERATE",
|
||||||
|
"name": "permission.project_track_case.minder_operate",
|
||||||
|
"resourceId": "PROJECT_TRACK_CASE"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "PROJECT_TRACK_CASE:READ+COPY",
|
"id": "PROJECT_TRACK_CASE:READ+COPY",
|
||||||
"name": "permission.project_track_case.copy",
|
"name": "permission.project_track_case.copy",
|
||||||
|
|
|
@ -393,7 +393,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateActiveDom(activeDom) {
|
updateActiveDom(activeDom) {
|
||||||
openMinderConfirm(this, activeDom, 'PROJECT_TRACK_CASE:READ+EDIT');
|
openMinderConfirm(this, activeDom, 'PROJECT_TRACK_CASE:READ');
|
||||||
},
|
},
|
||||||
importChangeConfirm(isSave) {
|
importChangeConfirm(isSave) {
|
||||||
store.isTestCaseMinderChanged = false;
|
store.isTestCaseMinderChanged = false;
|
||||||
|
|
|
@ -131,7 +131,7 @@ export default {
|
||||||
testCaseDefaultValue: 'testCaseDefaultValue',
|
testCaseDefaultValue: 'testCaseDefaultValue',
|
||||||
}),
|
}),
|
||||||
disabled() {
|
disabled() {
|
||||||
return !hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
|
return !hasPermission('PROJECT_TRACK_CASE_MINDER:OPERATE');
|
||||||
},
|
},
|
||||||
moveEnable() {
|
moveEnable() {
|
||||||
// 如果不是默认的排序条件不能调换位置
|
// 如果不是默认的排序条件不能调换位置
|
||||||
|
|
Loading…
Reference in New Issue