Skip to content

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

fix(frontend): check both rollout and taskRun permissions in new CI/CD workflow (#18838)

boojackd7c4ea9bd68d
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/registry/context.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/registry/context.ts
index 65ddeaac31..379d79a377 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/registry/context.ts
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/registry/context.ts
@@ -174,7 +174,12 @@ export function buildActionContext(input: ContextBuilderInput): ActionContext {
hasProjectPermissionV2(project, "bb.plans.update"),
createIssue: hasProjectPermissionV2(project, "bb.issues.create"),
updateIssue: hasProjectPermissionV2(project, "bb.issues.update"),
- createRollout: hasProjectPermissionV2(project, "bb.rollouts.create"),
+ // Check both permissions: developers have bb.rollouts.create (for legacy UI)
+ // but not bb.taskRuns.create, so they can't create rollouts in the new CI/CD workflow.
+ // Releasers have both permissions.
+ createRollout:
+ hasProjectPermissionV2(project, "bb.rollouts.create") &&
+ hasProjectPermissionV2(project, "bb.taskRuns.create"),
runTasks:
issue?.type === Issue_Type.DATABASE_EXPORT
? currentUserEmail === extractUserId(issue.creator)
diff --git a/frontend/src/composables/useIssueLayoutVersion.ts b/frontend/src/composables/useIssueLayoutVersion.ts
index e072f41f41..00381a7a76 100644
--- a/frontend/src/composables/useIssueLayoutVersion.ts
+++ b/frontend/src/composables/useIssueLayoutVersion.ts
@@ -6,7 +6,7 @@ const STORAGE_KEY = "bb.issue.layout";
// When releasing a new version as default, increment this number.
// This helps to reset user preferences to the new default layout.
-const CURRENT_DEFAULT_VERSION = 1;
+const CURRENT_DEFAULT_VERSION = 2;
// Send event to hub.bytebase.com when switching to legacy layout.
async function trackLayoutSwitch() {