Skip to content

Commit

Permalink
Rebase & update password enforcement / expiry date enable checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Apr 25, 2022
1 parent 47d08dc commit db2a881
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div id="oc-files-file-link" class="oc-position-relative">
<h3 class="oc-text-bold oc-m-rm oc-text-initial" v-text="linksHeading" />
<div
v-show="currentView === VIEW_SHOW"
:key="VIEW_SHOW"
Expand Down Expand Up @@ -160,7 +159,7 @@ export default defineComponent({
}
return {
enabled: expireDate.enabled, // why not !! ?
enabled: expireDate.enabled,
enforced: expireDate.enforced,
default: defaultExpireDate,
min: DateTime.now().setLocale(this.$language.current).toJSDate(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
:label="passwordLabel"
/>
<oc-button
v-if="!passwordEnforced && link.password"
v-if="!passwordEnforcedForRole && link.password"
id="oc-files-file-link-password-delete"
class="oc-mt-s"
appearance="raw"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,37 +203,36 @@ export default {
})
}
// enabled equals false for oCIS, what am I missing here? Is this about the default expiry date?
// if (this.expirationDate.enabled) {
if (this.link.expiration) {
result.push({
id: 'edit-expiration',
title: this.$gettext('Edit expiration date'),
method: () => this.updateLink(),
showDatepicker: true
})
if (!this.expirationDate.enforced) {
if (this.expirationDate.enabled) {
if (this.link.expiration) {
result.push({
id: 'remove-expiration',
title: this.$gettext('Remove expiration date'),
method: () =>
this.updateLink({
link: {
...this.link,
expiration: ''
}
})
id: 'edit-expiration',
title: this.$gettext('Edit expiration date'),
method: () => this.updateLink(),
showDatepicker: true
})
if (!this.expirationDate.enforced) {
result.push({
id: 'remove-expiration',
title: this.$gettext('Remove expiration date'),
method: () =>
this.updateLink({
link: {
...this.link,
expiration: ''
}
})
})
}
} else {
result.push({
id: 'add-expiration',
title: this.$gettext('Add expiration date'),
method: () => this.updateLink(),
showDatepicker: true
})
}
} else {
result.push({
id: 'add-expiration',
title: this.$gettext('Add expiration date'),
method: () => this.updateLink(),
showDatepicker: true
})
}
// }
if (this.link.password) {
result.push({
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13831,7 +13831,7 @@ __metadata:
marked: ^4.0.12
oidc-client: 1.11.5
owncloud-design-system: ^13.1.0-rc.5
owncloud-sdk: ~3.0.0-alpha.4
owncloud-sdk: ~3.0.0-alpha.5
p-queue: ^6.1.1
popper-max-size-modifier: ^0.2.0
portal-vue: ^2.1.7
Expand Down

0 comments on commit db2a881

Please sign in to comment.