Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: only check permission for issue update (#19360)
ecmadaob587a73455fe
diff --git a/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue b/frontend/src/components/Plan/components/HeaderSection/TitleInput.vueindex 03efd2b1e9..e587b707b4 100644--- a/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue+++ b/frontend/src/components/Plan/components/HeaderSection/TitleInput.vue@@ -24,12 +24,7 @@ import type { CSSProperties } from "vue";import { computed, reactive, watch } from "vue";import { useI18n } from "vue-i18n";import { issueServiceClientConnect, planServiceClientConnect } from "@/connect";-import {- extractUserEmail,- pushNotification,- useCurrentProjectV1,- useCurrentUserV1,-} from "@/store";+import { pushNotification, useCurrentProjectV1 } from "@/store";import {IssueSchema,UpdateIssueRequestSchema,@@ -44,7 +39,6 @@ import { usePlanContext } from "../../logic";type ViewMode = "EDIT" | "VIEW";const { t } = useI18n();-const currentUser = useCurrentUserV1();const { project } = useCurrentProjectV1();const {isCreating,@@ -105,10 +99,6 @@ const allowEdit = computed(() => {// If issue exists, check issue permissionsif (issue.value) {- // Allowed if current user is the creator.- if (extractUserEmail(issue.value.creator) === currentUser.value.email) {- return true;- }// Allowed if current user has related permission.if (hasProjectPermissionV2(project.value, "bb.issues.update")) {return true;diff --git a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/IssueCommentView/IssueDescriptionComment.vue b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/IssueCommentView/IssueDescriptionComment.vueindex 9b67b44ffe..5cbbe07ac4 100644--- a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/IssueCommentView/IssueDescriptionComment.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/IssueCommentView/IssueDescriptionComment.vue@@ -76,7 +76,7 @@ import HumanizeTs from "@/components/misc/HumanizeTs.vue";import { usePlanContext } from "@/components/Plan/logic";import UserAvatar from "@/components/User/UserAvatar.vue";import { issueServiceClientConnect } from "@/connect";-import { useCurrentProjectV1, useCurrentUserV1, useUserStore } from "@/store";+import { useCurrentProjectV1, useUserStore } from "@/store";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import type { IssueComment } from "@/types/proto-es/v1/issue_service_pb";import {@@ -92,7 +92,6 @@ defineProps<{}>();const { issue } = usePlanContext();-const currentUser = useCurrentUserV1();const userStore = useUserStore();const { project } = useCurrentProjectV1();@@ -122,9 +121,6 @@ const description = computed(() => {});const allowEdit = computed(() => {- if (currentUser.value.name === creator.value?.name) {- return true;- }return hasProjectPermissionV2(project.value, "bb.issues.update");});diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vueindex 334c2a79ef..90bf68d4e8 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue@@ -26,12 +26,7 @@ import { useI18n } from "vue-i18n";import IssueLabels from "@/components/IssueV1/components/Sidebar/IssueLabels.vue";import { useResourcePoller } from "@/components/Plan/logic/poller";import { issueServiceClientConnect } from "@/connect";-import {- extractUserEmail,- pushNotification,- useCurrentProjectV1,- useCurrentUserV1,-} from "@/store";+import { pushNotification, useCurrentProjectV1 } from "@/store";import {IssueStatus,UpdateIssueRequestSchema,@@ -48,7 +43,6 @@ const { plan, issue } = usePlanContextWithIssue();const isDatabaseChangePlan = computed(() =>plan.value.specs.some((spec) => spec.config?.case === "changeDatabaseConfig"));-const currentUser = useCurrentUserV1();const { project } = useCurrentProjectV1();const { refreshResources } = useResourcePoller();@@ -57,11 +51,6 @@ const allowChange = computed(() => {return false;}- // Allowed if current user is the creator.- if (extractUserEmail(issue.value.creator) === currentUser.value.email) {- return true;- }-return hasProjectPermissionV2(project.value, "bb.issues.update");});