mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-31 14:38:02 +00:00
fix: user list perm
This commit is contained in:
@@ -108,7 +108,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setting.treeUrl = `/api/v1/rbac/roles/${this.object.id}/permissions/tree/`
|
||||
this.setting.treeUrl = `/api/v1/rbac/${this.object.scope}-roles/${this.object.id}/permissions/tree/`
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
})
|
||||
|
@@ -251,14 +251,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setRolesFilter() {
|
||||
const roleTypes = ['system-roles', 'org-roles']
|
||||
const roleTypes = [{ name: 'system-roles', perm: 'systemrole' }, { name: 'org-roles', perm: 'orgrole' }]
|
||||
for (const roleType of roleTypes) {
|
||||
this.$axios.get(`/api/v1/rbac/${roleType}/`).then((roles) => {
|
||||
const fieldName = roleType.replace('-', '_')
|
||||
this.tableConfig.columnsMeta[fieldName].filters = roles.map(r => {
|
||||
return { text: r['display_name'], value: r.id }
|
||||
if (this.$hasPerm(`rbac.${roleType.perm}`)) {
|
||||
this.$axios.get(`/api/v1/rbac/${roleType}/`).then((roles) => {
|
||||
const fieldName = roleType.name.replace('-', '_')
|
||||
this.tableConfig.columnsMeta[fieldName].filters = roles.map(r => {
|
||||
return { text: r['display_name'], value: r.id }
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
removeUserFromOrg({ row, col, reload }) {
|
||||
|
Reference in New Issue
Block a user