Skip to content

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

chore(frontend): remove permission checks for querying data source (#13176)

boojackffeff319c3d8
diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
index 4855bb84e2..8a13332ff6 100644
--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue
@@ -52,7 +52,6 @@ import { computed, watch } from "vue";
import { useI18n } from "vue-i18n";
import {
useConnectionOfCurrentSQLEditorTab,
- useCurrentUserV1,
usePolicyV1Store,
useSQLEditorTabStore,
} from "@/store";
@@ -62,12 +61,10 @@ import {
DataSourceQueryPolicy_Restriction,
PolicyType,
} from "@/types/proto/v1/org_policy_service";
-import { hasWorkspacePermissionV2 } from "@/utils";
const { t } = useI18n();
const tabStore = useSQLEditorTabStore();
const { connection, database } = useConnectionOfCurrentSQLEditorTab();
-const currentUser = useCurrentUserV1();
const policyStore = usePolicyV1Store();
const adminDataSourceRestriction = computed(() => {
@@ -78,15 +75,6 @@ const adminDataSourceRestriction = computed(() => {
projectPolicy: DataSourceQueryPolicy_Restriction.RESTRICTION_UNSPECIFIED,
};
}
- if (
- hasWorkspacePermissionV2(currentUser.value, "bb.instances.adminExecute")
- ) {
- return {
- environmentPolicy:
- DataSourceQueryPolicy_Restriction.RESTRICTION_UNSPECIFIED,
- projectPolicy: DataSourceQueryPolicy_Restriction.RESTRICTION_UNSPECIFIED,
- };
- }
const projectLevelPolicy = policyStore.getPolicyByParentAndType({
parentPath: database.value.project,