-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[For 10.4] Include expiration option for user and group shares #36573
Conversation
@individual-it acceptance tests are done. Please have a quick review (code should be the same as the previous PR) of test code. |
Outstanding things to sort out:
|
Codecov Report
@@ Coverage Diff @@
## master #36573 +/- ##
============================================
- Coverage 64.68% 64.67% -0.02%
- Complexity 19071 19096 +25
============================================
Files 1268 1268
Lines 74522 74689 +167
Branches 1312 1320 +8
============================================
+ Hits 48207 48307 +100
- Misses 25930 25994 +64
- Partials 385 388 +3
Continue to review full report at Codecov.
|
@phil-davis This feature should not disabled
The UI part will be always hidden in a dropdown. Does that clarify it? |
Trying to clarify a bit the couple of issues:
There is no option to enable or disable the feature. The checkbox in the setting page is to set or not a default date and to enforce or not such default date as max date. If the checkbox is unchecked, it means that there is no default date set (or it should be ignored), but you can still set the expiration date normally.
Personally, I don't think this is bad assuming it works. I also have some doubts about the current behaviour: it might expire at the beginning of the day, so it might be "expired on creation", but I don't think it will be much of a problem as long as the admin doesn't enforce it. I agree we should probably control that scenario, but I don't think it's critical because if 0 is allowed I guess anyone can expect that the shares will expire today. It might not be useful, but as long as it doesn't break anything and the behaviour is clear I think we can live with that. |
Re: 0 expire days and issue #36569 - see item 5 in #36550 where a decision was made that 0 is not allowed. (I am just pointing to where the decision was made, for information. IMO @jvillafanez analysis above is also valid) So it would be possible to close #36569 and accept the current behavior |
47c4ef7
to
336cac6
Compare
I have merged the changes from #36587 and squashed this PR. CI should be good. Final reviews are needed. @micbar and whoever should review the code here. |
336cac6
to
45eafa5
Compare
}, | ||
|
||
onToggleShareDetails: function() { | ||
var $target = $(event.target); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing an "event" variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this is likely not covered by tests, so might not even be working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works without passing event
in. I guess it's already locally available. Added it for stringency.
I haven't checked the acceptance tests. |
@felixheidecke tests are passing, so I believe this works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most comments I made are about wording, specially because now the expiration date is not enabled/disabled but the default-expiration date can be set or not
Please apply the comments also to similar places in the rest of the feature files, I did not comment every single line
Additionally it would be good to also check if the share really was created or not, checking only the response might not be enough
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUIAdminSettings/adminSharingSettings.feature
Show resolved
Hide resolved
tests/acceptance/features/webUISharingExternal/federationSharing.feature
Show resolved
Hide resolved
tests/acceptance/features/webUISharingInternalGroups/shareWithGroupUsingExpirationDate.feature
Show resolved
Hide resolved
45eafa5
to
081e4d4
Compare
@felixheidecke JS tests failing https://drone.owncloud.com/owncloud/core/22056/7/6 |
5fd1bea
to
081e4d4
Compare
I cherry-picked the code from #36609 just now. |
484c92c
to
fd51174
Compare
Tests look good 👍 |
I just merged PR #36572 "Add share indicator in webUI" Conflicts resolved, rebased, pushed. Now wait for another CI result.... |
fd51174
to
8a1996c
Compare
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks fine to me except for:
- the weird file with svg+suffix as extension
- the function that uses
event
but has none define which is likely broken
tests/acceptance/features/apiShareManagementBasic/createShare.feature
Outdated
Show resolved
Hide resolved
@felixheidecke or whoever is the dev who knows about this code, please respond to this and other outstanding comments. e.g. I fixed the acceptance test comments and the 2 little code formatting comments. |
Aaaaand done! |
Description
This is a re-submit of PR #36324 and then PR #36531 with the commits squashed and rebased to the current master (that has "drop PHP 7.0" and phpunit7).
Please work on top of this in a separate branch for making acceptance tests or fixing bugs. Then we need to cherry-pick tests and bugs fixes into here in a controlled manner so that we do not write over each other's work.
Excerpt from the feature file:
Related Issue
How Has This Been Tested?
CI acceptance tests added for:
Screenshots:
Types of changes
Checklist: