Skip to content

Commit

Permalink
Merge pull request #30106 from owncloud/accept-user-share
Browse files Browse the repository at this point in the history
Accept user share notification
  • Loading branch information
Vincent Petry authored May 30, 2018
2 parents 104b02d + 10197f6 commit b9bfa6c
Show file tree
Hide file tree
Showing 72 changed files with 5,046 additions and 706 deletions.
33 changes: 33 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ pipeline:
matrix:
TEST_SUITE: caldav

install-notifications-app:
image: owncloudci/php:${PHP_VERSION}
pull: true
commands:
- git clone https://github.com/owncloud/notifications.git apps/notifications
- php occ a:e notifications
- echo "export APPS_TO_ENABLE=notifications" > environment.sh
when:
matrix:
INSTALL_NOTIFICATIONS-APP: true

fix-permissions:
image: owncloudci/php:${PHP_VERSION}
pull: true
Expand Down Expand Up @@ -213,6 +224,7 @@ pipeline:
- PLATFORM=Linux
- MAILHOG_HOST=email
commands:
- if [ -f ./environment.sh ]; then . ./environment.sh; fi
- bash tests/travis/start_ui_tests.sh --remote
when:
matrix:
Expand Down Expand Up @@ -474,6 +486,16 @@ matrix:
CHOWN_SERVER: true
OWNCLOUD_LOG: true

- PHP_VERSION: 7.1
TEST_SUITE: api
BEHAT_SUITE: apiSharingNotifications
DB_TYPE: mariadb
USE_SERVER: true
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_NOTIFICATIONS-APP: true

- PHP_VERSION: 7.1
TEST_SUITE: api
BEHAT_SUITE: apiCapabilities
Expand Down Expand Up @@ -558,6 +580,17 @@ matrix:
OWNCLOUD_LOG: true
USE_EMAIL: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
BEHAT_SUITE: webUISharingNotifications
DB_TYPE: mariadb
USE_SERVER: true
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
USE_EMAIL: true
INSTALL_NOTIFICATIONS-APP: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
BEHAT_SUITE: webUIFavorites
Expand Down
11 changes: 11 additions & 0 deletions apps/federatedfilesharing/lib/FederatedShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -945,4 +945,15 @@ public function isIncomingServer2serverShareEnabled() {
$result = $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes');
return ($result === 'yes') ? true : false;
}

/**
* @inheritdoc
*/
public function updateForRecipient(IShare $share, $recipient) {
/*
* This function does nothing yet as it is just for outgoing
* federated shares.
*/
return $share;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use OCP\ILogger;
use OCP\IUserManager;
use OCP\Share\IManager;
use OCP\Share\IShare;

/**
* Class FederatedShareProviderTest
Expand Down Expand Up @@ -784,4 +785,11 @@ public function dataTestFederatedSharingSettings() {
['no', false]
];
}

public function testUpdateForRecipientReturnsShare() {
$share = $this->createMock(IShare::class);
$returnedShare = $this->provider->updateForRecipient($share, 'recipient1');

$this->assertEquals($share, $returnedShare);
}
}
Loading

0 comments on commit b9bfa6c

Please sign in to comment.