Repository navigation
Auto accept incoming federated shares from trusted servers - #33980
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33980 +/- ##
============================================
- Coverage 64.76% 64.75% -0.01%
- Complexity 18355 18359 +4
============================================
Files 1198 1198
Lines 69487 69522 +35
Branches 1281 1281
============================================
+ Hits 45002 45022 +20
- Misses 24112 24127 +15
Partials 373 373
Continue to review full report at Codecov.
|
16ec4d0 to
6bea0a5
Compare
335d56d to
1e77210
Compare
a18e40d to
1ff1dd0
Compare
|
@PVince81 according to #27653 (comment) I somehow need to depend on the federation app anyway |
|
code and approach looks fine. @VicDeo add acceptance tests to validate the behavior ? |
62a4742 to
bb7bb32
Compare
bb7bb32 to
6c10d01
Compare
|
@VicDeo acceptance test added |
| Then file "lorem (2).txt" should not be listed on the webUI | ||
| And file "lorem (2).txt" should not be listed in the shared-with-you page on the webUI | ||
|
|
||
| Scenario: automatically accept a federation share when it is allowed by the config |
There was a problem hiding this comment.
also add a negative case "do not automatically accept" to confirm that it works correctly ?
There was a problem hiding this comment.
negative case is checked indirectly. user "user1" from server "LOCAL" has accepted the last pending share will fail this way in case the share was accepted automatically:
Scenario: unshare a federation share from "share-with-you" page # /drone/src/tests/acceptance/features/webUISharingExternal/federationSharing.feature:190
Given user "user1" from server "REMOTE" has shared "/lorem.txt" with user "user1" from server "LOCAL" # FederationContext::userFromServerHasSharedWithUserFromServer()
And user "user1" from server "LOCAL" has accepted the last pending share # FederationContext::userFromServerHasAcceptedLastPendingShare()
Notice: Trying to get property of non-object in /drone/src/tests/acceptance/features/bootstrap/FederationContext.php line 108
And the user has reloaded the current page of the webUI # WebUIGeneralContext::theUserReloadsTheCurrentPageOfTheWebUI()
When the user unshares file "lorem (2).txt" using the webUI # WebUIFilesContext::theUserDeletesFileUsingTheWebUI()
Then file "lorem (2).txt" should not be listed on the webUI # WebUIFilesContext::fileFolderShouldBeListedOnTheWebUI()
And file "lorem (2).txt" should not be listed in the files page on the webUI # WebUIFilesContext::fileFolderShouldBeListedOnTheWebUI()
SCENARIO RESULT: (fail)
PVince81
left a comment
There was a problem hiding this comment.
👍
please backport for 10.1.1+
|
Stable10: #34206 |
Description
All incoming shares from remote servers are accepted automatically when:
autoAddServersconfig option is set to '0' (default)occ config:app:set federation auto_accept_trusted --value '0'auto_accept_trustedconfig option is set to 'yes'occ config:app:set federatedfilesharing auto_accept_trusted --value 'yes'Related Issue
Closes #27653 https://github.com/owncloud/enterprise/issues/3051
How Has This Been Tested?
Types of changes
Checklist:
Open tasks: