fix(系统设置): 新增未设置个人设置与修改密码权限,直接通过路径访页面,依然可以修改的权限控制
--bug=1027369 --user=王旭 【系统设置】个人设置页面未受权限控制 https://www.tapd.cn/55049933/s/1387573
This commit is contained in:
parent
13006241be
commit
0d1bf7610f
|
@ -23,9 +23,9 @@
|
||||||
<el-table-column :label="$t('commons.operating')">
|
<el-table-column :label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div>
|
<div>
|
||||||
<ms-table-operator-button :tip="$t('member.edit_information')" icon="el-icon-edit"
|
<ms-table-operator-button v-permission="['PERSONAL_INFORMATION:READ+EDIT']" :tip="$t('member.edit_information')" icon="el-icon-edit"
|
||||||
type="primary" @exec="edit(scope.row)"/>
|
type="primary" @exec="edit(scope.row)"/>
|
||||||
<ms-table-operator-button :tip="$t('member.edit_password')" icon="el-icon-s-tools" v-if="isLocalUser"
|
<ms-table-operator-button :tip="$t('member.edit_password')" icon="el-icon-s-tools" v-if="isLocalUser && hasPermission('PERSONAL_INFORMATION:READ+EDIT_PASSWORD')"
|
||||||
type="success" @exec="editPassword(scope.row)"/>
|
type="success" @exec="editPassword(scope.row)"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<el-input v-model="form.phone" autocomplete="off"/>
|
<el-input v-model="form.phone" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div v-permission="['PERSONAL_INFORMATION:READ+THIRD_ACCOUNT']">
|
||||||
<div v-for="config in platformAccountConfigs" :key="config.key">
|
<div v-for="config in platformAccountConfigs" :key="config.key">
|
||||||
<platform-account-config
|
<platform-account-config
|
||||||
:config="config"
|
:config="config"
|
||||||
|
@ -62,6 +62,7 @@
|
||||||
</div>
|
</div>
|
||||||
<tapd-user-info @auth="handleAuth" v-if="hasTapd" :data="currentPlatformInfo"/>
|
<tapd-user-info @auth="handleAuth" v-if="hasTapd" :data="currentPlatformInfo"/>
|
||||||
<azure-devops-user-info @auth="handleAuth" v-if="hasAzure" :data="currentPlatformInfo"/>
|
<azure-devops-user-info @auth="handleAuth" v-if="hasAzure" :data="currentPlatformInfo"/>
|
||||||
|
</div>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<ms-dialog-footer
|
<ms-dialog-footer
|
||||||
@cancel="updateVisible = false"
|
@cancel="updateVisible = false"
|
||||||
|
@ -108,6 +109,7 @@ import {handleAuth as _handleAuth, updateInfo, updatePassword} from "../../api/u
|
||||||
import {getPlatformAccountInfo} from "../../api/platform-plugin";
|
import {getPlatformAccountInfo} from "../../api/platform-plugin";
|
||||||
import {ISSUE_PLATFORM_OPTION} from "../../utils/table-constants";
|
import {ISSUE_PLATFORM_OPTION} from "../../utils/table-constants";
|
||||||
import PlatformAccountConfig from "./PlatformAccountConfig";
|
import PlatformAccountConfig from "./PlatformAccountConfig";
|
||||||
|
import { hasPermission } from '../../utils/permission';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
@ -205,6 +207,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
hasPermission,
|
||||||
currentUser: () => {
|
currentUser: () => {
|
||||||
return getCurrentUser();
|
return getCurrentUser();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue