Skip to content

Commit

Permalink
bug: 社区版simple权限中心前端应该隐藏最大授权范围 #10040
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 3391
  • Loading branch information
vhwweng committed Mar 6, 2024
1 parent a88672b commit 7266ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/frontend/devops-manage/src/components/project-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const logoFiles = computed(() => {
const isRbac = computed(() => {
return authProvider.value === 'rbac'
})
const authProvider = ref(window.BK_CI_AUTH_PROVIDER || '')
const authProvider = ref(window.top.BK_CI_AUTH_PROVIDER || '')
const projectForm = ref(null);
const iframeRef = ref(null);
const vm = getCurrentInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {
ref,
watch,
computed,
} from 'vue';
import { useI18n } from 'vue-i18n';
import http from '@/http/api';
Expand Down Expand Up @@ -39,6 +40,10 @@ const exceptionObj = ref({
description: '',
showBtn: false
})
const isRbac = computed(() => {
return authProvider.value === 'rbac'
})
const authProvider = ref(window.top.BK_CI_AUTH_PROVIDER || '')
const projectList = window.parent?.vuexStore.state.projectList || [];
const fetchProjectData = async () => {
isLoading.value = true;
Expand Down Expand Up @@ -377,7 +382,7 @@ onMounted(async () => {
<span>{{ projectTypeNameMap[projectData.afterProjectType] }}</span>
</div>
</bk-form-item>
<bk-form-item :label="t('项目性质')" property="authSecrecy">
<bk-form-item v-if="isRbac" :label="t('项目性质')" property="authSecrecy">
<span class="item-value">{{ projectData.authSecrecy ? t('保密项目') : t('私有项目') }}</span>
<div class="diff-content" v-if="projectData.afterAuthSecrecy">
<p class="update-title">
Expand All @@ -387,7 +392,7 @@ onMounted(async () => {
<div>{{ projectData.afterAuthSecrecy ? t('保密项目') : t('私有项目') }}</div>
</div>
</bk-form-item>
<bk-form-item :label="t('项目最大可授权人员范围')" property="subjectScopes">
<bk-form-item v-if="isRbac" :label="t('项目最大可授权人员范围')" property="subjectScopes">
<span class="item-value">
<bk-tag
v-for="(subjectScope, index) in projectData.subjectScopes"
Expand Down

0 comments on commit 7266ca6

Please sign in to comment.