mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
perf(licenseTip): 管理员有license过期提醒,其它用户无license过期提醒
This commit is contained in:
@@ -20,9 +20,13 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'publicSettings'
|
||||
'publicSettings',
|
||||
'currentUser'
|
||||
]),
|
||||
isExpire() {
|
||||
if (this.currentUser.role !== 'Admin') {
|
||||
return false
|
||||
}
|
||||
const intervalDays = this.getIntervalDays(this.licenseData.date_expired)
|
||||
if (intervalDays < 0) {
|
||||
return this.$t('setting.LicenseExpired')
|
||||
@@ -34,7 +38,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.publicSettings.XPACK_ENABLED) {
|
||||
if (this.publicSettings.XPACK_ENABLED && this.currentUser.role === 'Admin') {
|
||||
this.$axios.get('/api/v1/xpack/license/detail').then(res => {
|
||||
this.licenseData = res
|
||||
}).finally(() => {
|
||||
|
||||
Reference in New Issue
Block a user