Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(frontend): Disable creating issue in the default project (#2986)
Liu Ji812e9c72df82
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 17cf698810..8ad91e0887 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -566,6 +566,9 @@ const routes: Array<RouteRecordRaw> = [true;}}+ if (project.id === DEFAULT_PROJECT_ID) {+ allowAlterSchemaOrChangeData = false;+ }if (allowAlterSchemaOrChangeData) {actionList.push("quickaction.bb.database.schema.update",diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vueindex cb111de582..951014d2ea 100644--- a/frontend/src/views/DatabaseDetail.vue+++ b/frontend/src/views/DatabaseDetail.vue@@ -141,7 +141,7 @@/></button><button- v-if="allowEdit"+ v-if="allowAlterSchemaOrChangeData"type="button"class="btn-normal"@click="createMigration('bb.issue.database.data.update')"@@ -153,7 +153,7 @@/></button><button- v-if="allowEdit"+ v-if="allowAlterSchemaOrChangeData"type="button"class="btn-normal"@click="createMigration('bb.issue.database.schema.update')"@@ -447,6 +447,13 @@ const allowEdit = computed(() => {return false;});+const allowAlterSchemaOrChangeData = computed(() => {+ if (database.value.project.id === DEFAULT_PROJECT_ID) {+ return false;+ }+ return allowEdit.value;+});+const allowEditDatabaseLabels = computed((): boolean => {// only allowed to edit database labels when allowAdminreturn allowAdmin.value;