Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] Allow share expiry dates lower than enforced limits #40928

Merged
merged 5 commits into from
Oct 28, 2023

Conversation

nfebe
Copy link
Contributor

@nfebe nfebe commented Oct 15, 2023

Manual backport : #40927

@nfebe nfebe added 3. to review Waiting for reviews feature: sharing labels Oct 15, 2023
@nfebe nfebe changed the title Allow share expiry dates lower than enforced limits [Bacport][stable27] Allow share expiry dates lower than enforced limits Oct 15, 2023
@nfebe nfebe changed the title [Bacport][stable27] Allow share expiry dates lower than enforced limits [Backport][stable27] Allow share expiry dates lower than enforced limits Oct 15, 2023
@nfebe nfebe added this to the Nextcloud 27.1.4 milestone Oct 15, 2023
@nfebe nfebe force-pushed the backport/stable27/40927 branch from b8799ef to fee38e6 Compare October 16, 2023 06:07
@solracsf solracsf changed the title [Backport][stable27] Allow share expiry dates lower than enforced limits [stable27] Allow share expiry dates lower than enforced limits Oct 16, 2023
@nfebe nfebe linked an issue Oct 24, 2023 that may be closed by this pull request
8 tasks
@nfebe nfebe force-pushed the backport/stable27/40927 branch from fee38e6 to 03536be Compare October 24, 2023 12:47
@nfebe nfebe requested a review from come-nc October 24, 2023 12:48
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works

@nfebe nfebe linked an issue Oct 28, 2023 that may be closed by this pull request
8 tasks
nfebe added 5 commits October 28, 2023 09:53
Previously, users could change the share expiry date up
to the enforced maximum.

The new share flow imposed the enforced share expiry
date maximum literally and did not allow even dates
lower than the maximum enforced.

That does not make much sense, if the enforced expiry date is 30
days from creation date, then it's logical to allow users set the
date to anything less than 30 days from the creation date.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
We should check that a maximum expiry date has been enforced for
all shares and NOT JUST FOR internal shares before enforcing a UI max date,
like in commit 9757e68

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Current expiration date errorneously assumes that `defaultExpirationDate`
applies to all kinds of shares. But it only really applies to public shares despite
its name.

This commit, fixes that by paring expiration dates with the correct share types during
new share initialization and simplifying the `hasExpirationDate` (check) property.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
`isDefaultExpireDateEnforced` and its corresponding `defaultExpirationDate`
is currently treated as the enforcement fallback when share type enforcements are not
set.

However, `isDefaultExpireDateEnforced` and `defaultExpirationDate` are actually more like
`isDefaultPublicExpireDateEnforced` and `defaultPublicExpirationDate` and therefore only applies
to public shares.

It might be ideal to rename this variables all the way from the backend config to the way we use
them in the frontend code.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Allow download was duplicated via a rebase/merge action during
fe78157 this fixes that.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
@nfebe nfebe force-pushed the backport/stable27/40927 branch from 03536be to 2f0e9a8 Compare October 28, 2023 08:54
@nfebe nfebe merged commit 1452773 into stable27 Oct 28, 2023
37 checks passed
@nfebe nfebe deleted the backport/stable27/40927 branch October 28, 2023 09:31
@blizzz blizzz mentioned this pull request Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
3 participants