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

Fix public link share, default expiration behavior #34960

Merged
merged 2 commits into from
Apr 5, 2019
Merged

Conversation

karakayasemi
Copy link
Contributor

@karakayasemi karakayasemi commented Apr 3, 2019

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

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:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #34960 into master will decrease coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34960      +/-   ##
============================================
- Coverage     65.38%   65.37%   -0.01%     
+ Complexity    18592    18588       -4     
============================================
  Files          1213     1213              
  Lines         70408    70401       -7     
  Branches       1295     1295              
============================================
- Hits          46036    46027       -9     
- Misses        23998    24000       +2     
  Partials        374      374
Flag Coverage Δ Complexity Δ
#javascript 52.85% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.82% <50%> (-0.01%) 18588 <0> (-4)
Impacted Files Coverage Δ Complexity Δ
lib/private/Share20/Manager.php 97.43% <ø> (-0.03%) 230 <0> (-4)
settings/templates/panels/admin/filesharing.php 19.04% <50%> (ø) 0 <0> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 96.55% <0%> (-1.73%) 29% <0%> (ø)
lib/private/Server.php 86.56% <0%> (-0.12%) 253% <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 d8a0703...d88dffa. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #34960 into master will decrease coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34960      +/-   ##
============================================
- Coverage     65.38%   65.38%   -0.01%     
+ Complexity    18592    18588       -4     
============================================
  Files          1213     1213              
  Lines         70408    70400       -8     
  Branches       1295     1295              
============================================
- Hits          46035    46028       -7     
+ Misses        23999    23998       -1     
  Partials        374      374
Flag Coverage Δ Complexity Δ
#javascript 52.85% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.82% <75%> (-0.01%) 18588 <0> (-4)
Impacted Files Coverage Δ Complexity Δ
lib/private/Share20/Manager.php 97.43% <ø> (-0.03%) 230 <0> (-4)
settings/templates/panels/admin/filesharing.php 19.51% <75%> (+0.46%) 0 <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 428b64a...7683bef. Read the comment docs.

@karakayasemi karakayasemi force-pushed the fix-expiration branch 2 times, most recently from 183fbe5 to 4d500f6 Compare April 3, 2019 17:51
@jvillafanez
Copy link
Member

Screen Shot 2019-04-04 at 12 50 54

Not sure if it's intended, but shouldn't the "enforce expiration date" checkbox be below the date?

@karakayasemi
Copy link
Contributor Author

Screen Shot 2019-04-04 at 12 50 54

Not sure if it's intended, but shouldn't the "enforce expiration date" checkbox be below the date?

I did not make any change about it. The issue and PR are only about sub-entry location. We can ask it to @pmaier1 and @PVince81 .

@PVince81
Copy link
Contributor

PVince81 commented Apr 4, 2019

@karakayasemi yeah, you could just fix the wrapping to have it go to the next line

@pmaier1
Copy link
Contributor

pmaier1 commented Apr 4, 2019

Yes, agreed, move it below, please.

@karakayasemi
Copy link
Contributor Author

"enforce expiration date" checkbox carried to newline by adding <br/> after first input.

@PVince81 PVince81 merged commit 11f8016 into master Apr 5, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-expiration branch April 5, 2019 07:46
@PVince81
Copy link
Contributor

PVince81 commented Apr 5, 2019

@karakayasemi please backport

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.

4 participants