Skip to content

Commit 289adc3

Browse files
authored
Bugfix in ALCs (#255)
1 parent 0f63950 commit 289adc3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/ACLEdit.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
return-object
2828
>
2929
<template v-slot:item.name="{ item }">
30-
<router-link :to="{ name: 'UserProfileAdmin', params: { id: item.source.replace('users/', '') } }">{{
30+
<router-link
31+
v-if="item.source.includes('users/')"
32+
:to="{ name: 'UserProfileAdmin', params: { id: item.source.replace('users/', '') } }"
33+
>{{ item.name }}</router-link
34+
>
35+
<router-link v-if="item.source.includes('groups/')" :to="{ name: 'GroupAdmin' }">{{
3136
item.name
3237
}}</router-link>
3338
</template>
@@ -132,7 +137,7 @@ export default {
132137
methods: {
133138
getMembershipData() {
134139
axios
135-
.get(`/api/v2/${this.endpointForType}/${this.object.id}`)
140+
.get(`/api/v2/rbac/${this.object.root_type}/${this.object.id}`)
136141
.then(response => {
137142
this.ACLTableData = this.generateAclTable(response.data);
138143
})
@@ -304,7 +309,7 @@ export default {
304309
},
305310
mounted() {
306311
this.listUsers();
307-
this.ACLTableData = this.generateAclTable(this.object);
312+
this.getMembershipData();
308313
},
309314
watch: {
310315
group: {

src/components/DFIQ/EditDFIQObject.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ export default {
694694
return FORM_METADATA[this.localObject.type].rules;
695695
},
696696
hasOwnerPerms() {
697-
return this.user.admin || this.localObject.acls[this.user.username].role & 7;
697+
return this.userStore.hasOwnerPerms(this.localObject);
698698
}
699699
},
700700
watch: {

0 commit comments

Comments
 (0)