mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
fix: 修复审计员可以点击dashboard页面的资产/用户总数的问题
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
</div>
|
||||
<slot>
|
||||
<h1 class="no-margins">
|
||||
<router-link :to="body.route">
|
||||
<span v-if="body.noLink">
|
||||
{{ body.count }}
|
||||
</span>
|
||||
<router-link v-else :to="body.route">
|
||||
<span>{{ body.count }}</span>
|
||||
</router-link>
|
||||
</h1>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
<script>
|
||||
import SummaryCard from '@/components/SummaryCard'
|
||||
import rolc from '@/utils/role'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ResourceSummary',
|
||||
@@ -23,6 +25,12 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'currentOrgRoles'
|
||||
]),
|
||||
isOrgAuditor() {
|
||||
return rolc.getRolesDisplay(this.currentOrgRoles).includes('OrgAuditor') || rolc.getRolesDisplay(this.currentOrgRoles).includes('Auditor')
|
||||
},
|
||||
summaryItems() {
|
||||
return [
|
||||
{
|
||||
@@ -34,7 +42,8 @@ export default {
|
||||
body: {
|
||||
route: `/users/users`,
|
||||
count: this.counter.total_count_users,
|
||||
comment: 'All users'
|
||||
comment: 'All users',
|
||||
noLink: this.isOrgAuditor
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -46,7 +55,8 @@ export default {
|
||||
body: {
|
||||
route: `/assets/assets`,
|
||||
count: this.counter.total_count_assets,
|
||||
comment: 'All assets'
|
||||
comment: 'All assets',
|
||||
noLink: this.isOrgAuditor
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user