core icon indicating copy to clipboard operation
core copied to clipboard

"Auto Accept federated share from trusted server" doesnot works when "automatically add servers after successful share" is enabled

Open dpakach opened this issue 4 years ago • 1 comments

Steps to reproduce

  1. Create two owncloud servers server and server2
  2. On server 1 a. Login as admin and go to admin sharing settings page b. Add server2 url as trusted server c. Enable "Add server automatically once a federated share was created successfully" (config parameter autoAddServers of app federation has been set to 1) d. Enable "Automatically accept remote shares from trusted servers" (config parameter auto_accept_trusted of app federatedfilesharing has been set to yes)
  3. From server2 upload file lorem.txt Perform a federated share to a user from server1

Expected behaviour

The file lorem.txt should exist for the user on server1 as the federated share should be accepted automatically.

Actual behaviour

The share is not auto accepted.

dpakach avatar Jul 16 '19 10:07 dpakach

lorem.txt exists for the user on server1 as the federated share is accepted automatically.

Update:

  • auto accept from trusted servers enabled with remote servers :heavy_check_mark:

  • auto accept from the trusted servers disabled with remote servers :heavy_check_mark:

  • federated share with autoAddServer enabled :heavy_check_mark:

  • federated share with autoAddServer disabled :heavy_check_mark:

  • enable autoAddServer once a federated share was created successfully :exclamation:

    Background:
      Given using server "REMOTE"
      And the administrator has set the default folder for received shares to "Shares"
      And auto-accept shares has been disabled
      And user "Alice" has been created with default attributes and without skeleton files
      And using server "LOCAL"
      And the administrator has set the default folder for received shares to "Shares"
      And auto-accept shares has been disabled
      And user "Brian" has been created with default attributes and without skeleton files
    Scenario:
      Given using server "REMOTE"
      And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
      And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile1.txt"
      And using server "LOCAL"
      And parameter "autoAddServers" of app "federation" has been set to "1"
      And parameter "auto_accept_trusted" of app "federatedfilesharing" has been set to "yes"
      When user "Alice" from server "REMOTE" shares "/textfile0.txt" with user "Brian" from server "LOCAL" using the sharing API
      And user "Brian" from server "LOCAL" accepts the last pending share using the sharing API
      Then the HTTP status code of responses on all endpoints should be 200
      And the OCS status code of responses on all endpoints should be "100"
      When using server "LOCAL"
      Then url "%remote_server%" should be a trusted server
      When user "Alice" from server "REMOTE" shares "/textfile1.txt" with user "Brian" from server "LOCAL" using the sharing API
      Then the HTTP status code should be "200"
      And the OCS status code should be "100"
      ---
      Then as "Brian" file "Shares/textfile1.txt" should exist (expected)
      Then as "Brian" file "Shares/textfile1.txt" should not exist (actual)
    
  • disable autoAddServer once a federated share was created successfully :heavy_check_mark:

kiranparajuli589 avatar Apr 25 '22 09:04 kiranparajuli589