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

[stable10] Fix public link share default expiration behavior #34971

Merged
merged 2 commits into from
Apr 5, 2019

Conversation

karakayasemi
Copy link
Contributor

Backport of #34960

Description

  • "default link expiration" sub-entry location problem fixed. Now, it is under "Set expiration date".

  • Currently, when the expiration date enabled and not enforced, the default expiration date is set even though the user deleted it on share creation. With this PR, if the user removes the expiration date on share creation, no expiration date will be set as discussed in here: https://github.com/owncloud/enterprise/issues/3204#issuecomment-478657949

Related Issue

Closes https://github.com/owncloud/enterprise/issues/3204

Motivation and Context

Fixing bugs.

How Has This Been Tested?

Unit tests are adjusted. Also, manually tested with following steps:

  • Activate, "Set expiration date" from admin sharing settings. The expiration date sub-entry should be listed under "Set expiration date" input.

To test share creation behavior;

  • Activate, "Set expiration date" but not enforce.
  • Click share a file via public link and remove default expiration date from its input field. The share should be created without an expiration date.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@codecov
Copy link

codecov bot commented Apr 5, 2019

Codecov Report

Merging #34971 into stable10 will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34971      +/-   ##
==============================================
- Coverage       64.21%   64.21%   -0.01%     
+ Complexity      19910    19906       -4     
==============================================
  Files            1277     1277              
  Lines           76371    76363       -8     
  Branches         1292     1292              
==============================================
- Hits            49045    49039       -6     
+ Misses          26947    26945       -2     
  Partials          379      379
Flag Coverage Δ Complexity Δ
#javascript 53.2% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.38% <75%> (-0.01%) 19906 <0> (-4)
Impacted Files Coverage Δ Complexity Δ
lib/private/Share20/Manager.php 97.39% <ø> (-0.03%) 226 <0> (-4)
settings/templates/panels/admin/filesharing.php 19.51% <75%> (+0.46%) 0 <0> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 98.27% <0%> (+1.72%) 29% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f67160...85c555e. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants