-
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
Can share capability #31816
Can share capability #31816
Conversation
5328ba3
to
73ab4fa
Compare
Codecov Report
@@ Coverage Diff @@
## master #31816 +/- ##
============================================
- Coverage 63.24% 47.75% -15.5%
============================================
Files 1158 109 -1049
Lines 69305 10364 -58941
Branches 1261 1261
============================================
- Hits 43830 4949 -38881
+ Misses 25105 5045 -20060
Partials 370 370
Continue to review full report at Codecov.
|
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.
👍 thanks
Backport |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
can_share
true
if the user is able to share files/folders (possibly restricted by the other generalfiles_sharing
settings).false
if the user is not able/allowed to share files/folders. Currently this would be because the user is in a group that is excluded from sharing, or sharing is completely disabled. In future there might be other settings that also contribute to the final decision as to ifcan_share
istrue
or ``false```.Related Issue
#31817
Derived from issue #31576 and PR #31580
Motivation and Context
It is nice if clients can find out if the current user is able to share. For example, a client could examine the other capabilities and see that sharing is enabled etc. But the user could be in a group that is excluded from sharing, so actually for that user there is no point in the client letting them attempt to share stuff.
How Has This Been Tested?
Acceptance tests run locally.
During running the acceptance tests locally, the last scenario
capabilities.feature:559
was failing. I discovered that functionisSharingDisabledForUser()
inlib/private/legacy/util.php
had not had the new logic put in it. See 2nd commit that makes that fix.Types of changes
Checklist: