Merge pull request #432 from jumpserver/dev

chore: merge dev to master
This commit is contained in:
Orange
2020-10-14 16:04:36 +08:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -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(() => {

View File

@@ -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