mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
@@ -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(() => {
|
||||
|
||||
@@ -125,13 +125,12 @@ export default {
|
||||
for (const rule of this.rulesList) {
|
||||
for (const user of this.InviteValue) {
|
||||
data.push({
|
||||
org: this.currentOrg.id,
|
||||
user: user,
|
||||
role: rule
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$axios.post(`/api/v1/orgs/org-memeber-relation/?org_id=${this.currentOrg.id}&ignore_already_exist=1`, data).then(() => {
|
||||
this.$axios.post(`/api/v1/users/users/invite/`, data).then(() => {
|
||||
this.$message.success(this.$t('common.AddSuccessMsg'))
|
||||
}).finally(() => {
|
||||
this.InviteLoading = false
|
||||
|
||||
Reference in New Issue
Block a user