mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
fix: 修复创建流水线无法选择通知的bug
This commit is contained in:
+13
-10
@@ -134,18 +134,21 @@ async function emitValue(value: any) {
|
||||
const userId = userStore.userInfo.id;
|
||||
const isEnterprice = projectStore.isEnterprise;
|
||||
|
||||
if (isEnterprice) {
|
||||
const projectId = projectStore.currentProjectId;
|
||||
if (pipeline?.value?.projectId !== projectId) {
|
||||
message.error("对不起,您不能修改其他项目流水线的通知");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (pipeline?.value?.userId !== userId) {
|
||||
message.error("对不起,您不能修改他人流水线的通知");
|
||||
return;
|
||||
if (pipeline?.value) {
|
||||
if (isEnterprice) {
|
||||
const projectId = projectStore.currentProjectId;
|
||||
if (pipeline?.value?.projectId !== projectId) {
|
||||
message.error("对不起,您不能修改其他项目流水线的通知");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (pipeline?.value?.userId !== userId) {
|
||||
message.error("对不起,您不能修改他人流水线的通知");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
emit("change", value);
|
||||
emit("update:modelValue", value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user