Skip to content

Commit 5d63379

Browse files
authored
ui: Add support to filter Roles permissions (apache#5488)
1 parent 67be3da commit 5d63379

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ui/src/views/iam/RolePermissionTab.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,15 @@ export default {
171171
}).finally(() => {
172172
this.loadingTable = false
173173
this.updateTable = false
174+
this.updateApis()
174175
if (callback) callback()
175176
})
176177
},
178+
updateApis () {
179+
this.apis = Object.keys(this.$store.getters.apis).sort((a, b) => a.localeCompare(b))
180+
var apisSupported = this.rules?.map(rule => rule.rule) || []
181+
this.apis = this.apis.filter(api => !apisSupported.includes(api))
182+
},
177183
changeOrder () {
178184
api('updateRolePermission', {}, 'POST', {
179185
roleid: this.resource.id,

0 commit comments

Comments
 (0)