Skip to content

Commit

Permalink
Change opacity level for inherited permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Miloslav Nenadal <nenadalm@gmail.com>
  • Loading branch information
nenadalm committed Mar 11, 2020
1 parent 6ad20ae commit 1d0783c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/AclStateButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<div v-else style="position: relative;" v-click-outside="popoverClose">
<button :disabled="disabled" @click="open = true" v-if="state === STATES.INHERIT_DENY" class="icon-deny inherited" v-tooltip="t('groupfolders', 'Denied (Inherited permission)')"></button>
<button :disabled="disabled" @click="open = true" v-else-if="state === STATES.INHERIT_ALLOW" class="icon-checkmark inherited" v-tooltip="t('groupfolders', 'Allowed (Inherited permission)')"></button>
<button :disabled="disabled" @click="open = true" v-else-if="state === STATES.SELF_DENY" class="icon-deny" v-tooltip="t('groupfolders', 'Denied')"></button>
<button :disabled="disabled" @click="open = true" v-else-if="state === STATES.SELF_ALLOW" class="icon-checkmark" v-tooltip="t('groupfolders', 'Allowed')"></button>
<button :disabled="disabled" @click="open = true" v-else-if="state === STATES.SELF_DENY" v-bind:class="'icon-deny' + (inherited ? ' inherited' : '')" v-tooltip="t('groupfolders', 'Denied')"></button>
<button :disabled="disabled" @click="open = true" v-else-if="state === STATES.SELF_ALLOW" v-bind:class="'icon-checkmark' + (inherited ? ' inherited' : '')" v-tooltip="t('groupfolders', 'Allowed')"></button>
<div class="popovermenu" :class="{open: open}"><PopoverMenu :menu="menu"></PopoverMenu></div>
</div>
</template>
Expand All @@ -47,6 +47,10 @@
name: 'AclStateButton',
components: {PopoverMenu},
props: {
inherited: {
type: Boolean,
default: false
},
state: {
type: Number,
default: STATES.INHERIT_DENY
Expand Down
5 changes: 5 additions & 0 deletions src/components/SharingSidebarView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,27 @@
</td>
<td class="state-column">
<AclStateButton :state="getState(OC.PERMISSION_READ, item.permissions, item.mask)"
:inherited="item.inherited"
@update="changePermission(item, OC.PERMISSION_READ, $event)" :disabled="loading"/>
</td>
<td class="state-column">
<AclStateButton :state="getState(OC.PERMISSION_UPDATE, item.permissions, item.mask)"
:inherited="item.inherited"
@update="changePermission(item, OC.PERMISSION_UPDATE, $event)" :disabled="loading"/>
</td>
<td class="state-column" v-if="model.type === 'dir'">
<AclStateButton :state="getState(OC.PERMISSION_CREATE, item.permissions, item.mask)"
:inherited="item.inherited"
@update="changePermission(item, OC.PERMISSION_CREATE, $event)" :disabled="loading"/>
</td>
<td class="state-column">
<AclStateButton :state="getState(OC.PERMISSION_DELETE, item.permissions, item.mask)"
:inherited="item.inherited"
@update="changePermission(item, OC.PERMISSION_DELETE, $event)" :disabled="loading"/>
</td>
<td class="state-column">
<AclStateButton :state="getState(OC.PERMISSION_SHARE, item.permissions, item.mask)"
:inherited="item.inherited"
@update="changePermission(item, OC.PERMISSION_SHARE, $event)" :disabled="loading"/>
</td>
<td class="state-column"><a v-if="item.inherited === false" class="icon-close" v-tooltip="t('groupfolders', 'Remove access rule')"
Expand Down

0 comments on commit 1d0783c

Please sign in to comment.