Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/SharingSidebarView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { showError } from '@nextcloud/dialogs'
import { Permission } from '@nextcloud/files'
import { t } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
import { nextTick, ref, useTemplateRef, watch } from 'vue'
import { computed, nextTick, ref, useTemplateRef, watch } from 'vue'
import NcAvatar from '@nextcloud/vue/components/NcAvatar'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
Expand Down Expand Up @@ -48,6 +48,11 @@ const groupFolderId = ref<number>()
const aclBasePermission = ref<number>(Permission.ALL)
const list = ref<Rule[]>([])
const inheritedAcls = ref<Rule[]>([])
const notSetInheritedAcl = computed(() => {
return inheritedAcls
.value
.filter((rule) => list.value.find((r) => r.getUniqueMappingIdentifier() === rule.getUniqueMappingIdentifier()) === undefined)
});

// component state
const showAclCreate = ref(false)
Expand Down Expand Up @@ -359,7 +364,7 @@ async function changePermission(item: Rule, permission: number, state: number) {
</tr>
</tbody>
<tbody v-else>
<tr v-for="item in [...inheritedAcls, ...list]" :key="item.mappingType + '-' + item.mappingId">
<tr v-for="item in [...notSetInheritedAcl, ...list]" :key="item.mappingType + '-' + item.mappingId">
<td :title="getFullDisplayName(item.mappingDisplayName, item.mappingType)" class="username">
<NcAvatar :user="item.mappingId" :is-no-user="item.mappingType !== 'user'" :size="24" />
<span class="hidden-visually">{{ getFullDisplayName(item.mappingDisplayName, item.mappingType) }}</span>
Expand Down
Loading