summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-04-26 14:15:00 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2021-04-26 16:10:44 +0200
commit70f12e7332e341c259a4ca94502f743c9c021570 (patch)
tree9a545c353e70542a60ee3e0909b1f5bc2d5d11f8
parentaa651fd629534e96432492c1a74e979b28222ce2 (diff)
downloadnextcloud-server-70f12e7332e341c259a4ca94502f743c9c021570.tar.gz
nextcloud-server-70f12e7332e341c259a4ca94502f743c9c021570.zip
Improve federated permission handling
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php20
1 files changed, 2 insertions, 18 deletions
diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
index 63877f3307c..e21ce633dd2 100644
--- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
@@ -31,6 +31,7 @@ namespace OCA\FederatedFileSharing\OCM;
use OC\AppFramework\Http;
use OC\Files\Filesystem;
+use OC\HintException;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\Activity\Providers\RemoteShares;
@@ -678,24 +679,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* @throws BadRequestException
*/
protected function updateResharePermissions($id, array $notification) {
- if (!isset($notification['sharedSecret'])) {
- throw new BadRequestException(['sharedSecret']);
- }
- $token = $notification['sharedSecret'];
-
- if (!isset($notification['permission'])) {
- throw new BadRequestException(['permission']);
- }
- $ocmPermissions = $notification['permission'];
-
- $share = $this->federatedShareProvider->getShareById($id);
-
- $ncPermission = $this->ocmPermissions2ncPermissions($ocmPermissions);
-
- $this->verifyShare($share, $token);
- $this->updatePermissionsInDatabase($share, $ncPermission);
-
- return [];
+ throw new HintException('Updating reshares not allowed');
}
/**