-
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
Add share type to the verifyExpirationDate hook #37135
Conversation
This looks like "a good thing" (tm). In the morning I can make some acceptance tests in password_policy that demonstrate the bug and then that the fix works. |
Codecov Report
@@ Coverage Diff @@
## master #37135 +/- ##
============================================
+ Coverage 64.78% 64.78% +<.01%
Complexity 19130 19130
============================================
Files 1267 1267
Lines 74912 74913 +1
Branches 1328 1328
============================================
+ Hits 48533 48534 +1
Misses 25989 25989
Partials 390 390
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #37135 +/- ##
=========================================
Coverage 64.78% 64.78%
Complexity 19130 19130
=========================================
Files 1267 1267
Lines 74912 74913 +1
Branches 1328 1328
=========================================
+ Hits 48533 48534 +1
Misses 25989 25989
Partials 390 390
Continue to review full report at Codecov.
|
@VicDeo I added a changelog. What about unit test changes/additions? For example, https://github.com/owncloud/core/blob/master/tests/lib/Share20/ManagerTest.php#L1130 could have:
and the expects for listener can be:
The existing tests (which are really for public links) could be adjusted so they explicitly setShareType. And add some tests to check what happens to the hook when share type is Whatever you think. For me it would be nice to get this PR merged ASAP. It makes drone CI testing from password_policy app much easier. |
Tested locally/manually along with owncloud/password_policy#293 and works. |
@phil-davis this oneliner is not worthy an unit test for me. |
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.
This has been discussed and tested - approving.
Description
add type of the share to the verifyExpirationDate hook
Related Issue
Motivation and Context
it is not possible to distinguish public links from other share types
How Has This Been Tested?
Set public link expiration policies in the password policy app according to Cannot create ordinary share with users when public link expiry is set password_policy#287
Create a user or group share
expected
share is created
actual
share creation is blocked due to public link policies
Types of changes
Checklist: