Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: use bb.permission.project.create-or-transfer-database instead of bb.permission.project.admin-database (#3275)

Tianzhou (天舟)61291ce9a100
diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vue
index bd4a29fbf7..c60fcfe33b 100644
--- a/frontend/src/views/DatabaseDetail.vue
+++ b/frontend/src/views/DatabaseDetail.vue
@@ -130,7 +130,7 @@
{{ $t("common.sync-now") }}
</button>
<button
- v-if="allowChangeProject"
+ v-if="allowTransferProject"
type="button"
class="btn-normal"
@click.prevent="tryTransferProject"
@@ -386,8 +386,8 @@ const database = computed((): Database => {
// Project can be transferred if meets either of the condition below:
// - Database is in default project
// - Workspace role can manage instance
-// - Project role can admin database
-const allowChangeProject = computed(() => {
+// - Project role can transfer database
+const allowTransferProject = computed(() => {
if (database.value.project.id == DEFAULT_PROJECT_ID) {
return true;
}
@@ -404,7 +404,10 @@ const allowChangeProject = computed(() => {
for (const member of database.value.project.memberList) {
if (
member.principal.id == currentUser.value.id &&
- hasProjectPermission("bb.permission.project.admin-database", member.role)
+ hasProjectPermission(
+ "bb.permission.project.create-or-transfer-database",
+ member.role
+ )
) {
return true;
}
@@ -418,7 +421,7 @@ const allowChangeProject = computed(() => {
// - Project role can admin database
//
// The admin operation includes
-// - Transfer project
+// - Edit database label
// - Enable/disable backup
const allowAdmin = computed(() => {
if (