aboutsummaryrefslogtreecommitdiffstats
path: root/package-lock.json
Commit message (Expand)AuthorAgeFilesLines
* chore(deps): bump @nextcloud/vue from 8.9.1 to 8.10.0Grigorii K. Shartsev2024-03-111-4/+4
* chore(deps-dev): bump @types/dockerode from 3.3.24 to 3.3.26dependabot[bot]2024-03-091-4/+4
* chore(deps): bump @nextcloud/vue to 8.9.1 & @nextcloud/dialogs to 5.2.0John Molakvoæ (skjnldsv)2024-03-071-20/+21
* chore(deps): Bump nextcloud/vue from `8.7.1` to `8.8.1`julia.kirschenheuter2024-03-041-30/+30
* chore(deps): Bump libphonenumber-js from 1.10.56 to 1.10.57dependabot[bot]2024-03-041-4/+4
* chore(deps): Bump webdav from 5.3.2 to 5.4.0dependabot[bot]2024-03-031-8/+8
* chore(deps): Bump calendar-availability-vue from 2.1.0 to 2.2.0julia.kirschenheuter2024-02-261-1/+1
* chore(deps): Bump moment-timezone from 0.5.43 to 0.5.45dependabot[bot]2024-02-241-1/+1
* chore(deps): use `@vueuse/core@10.7.2` and fix momentskjnldsv2024-02-231-18/+62
* chore(files_sharing): use `OCSResponse` from `@nextcloud/typings`skjnldsv2024-02-231-1541/+2418
* chore: Update `@nextcloud/dialogs` to 5.1.2Ferdinand Thiessen2024-02-221-11/+24
* Merge pull request #43735 from nextcloud/dependabot/npm_and_yarn/cypress-13.6.5John Molakvoæ2024-02-211-16/+6
|\
| * chore(deps-dev): Bump cypress from 13.4.0 to 13.6.5dependabot[bot]2024-02-211-16/+6
* | Merge pull request #43737 from nextcloud/dependabot/npm_and_yarn/browserslist...John Molakvoæ2024-02-211-9/+9
|\ \
| * | chore(deps): Bump browserslist-useragent-regexp from 4.1.0 to 4.1.1dependabot[bot]2024-02-211-9/+9
| |/
* / chore(deps): Bump regenerator-runtime from 0.14.0 to 0.14.1dependabot[bot]2024-02-211-4/+4
|/
* chore(deps-dev): Bump ip from 1.1.8 to 1.1.9dependabot[bot]2024-02-201-6/+6
* chore(deps): Bump @nextcloud/browser-storage from 0.2.0 to 0.3.0dependabot[bot]2024-02-201-32/+10
* chore(deps): Bump dompurify from 3.0.6 to 3.0.8dependabot[bot]2024-02-201-4/+4
* chore(deps): bumped NcVue to 8.7.0Eduardo Morales2024-02-201-4/+4
* Merge pull request #43673 from nextcloud/dependabot/npm_and_yarn/dockerode-4.0.2John Molakvoæ2024-02-201-14/+14
|\
| * chore(deps-dev): Bump dockerode from 4.0.0 to 4.0.2dependabot[bot]2024-02-201-14/+14
* | Merge pull request #43676 from nextcloud/dependabot/npm_and_yarn/nextcloud/st...dependabot[bot]2024-02-201-20/+23
|\ \
| * | chore(deps-dev): Bump @nextcloud/stylelint-config from 2.3.1 to 2.4.0dependabot[bot]2024-02-201-20/+23
| |/
* / chore(deps-dev): Bump @cypress/webpack-preprocessor from 6.0.0 to 6.0.1dependabot[bot]2024-02-201-4/+4
|/
* chore(deps-dev): Bump @vue/tsconfig from 0.4.0 to 0.5.1dependabot[bot]2024-02-171-4/+4
* chore(deps-dev): bump undici from 5.27.2 to 5.28.3dependabot[bot]2024-02-161-3/+3
* chore(deps): bump `@nextcloud/upload` to `1.0.5`skjnldsv2024-02-141-8/+9
* chore(deps-dev): Bump cypress-wait-until from 2.0.1 to 3.0.1dependabot[bot]2024-02-101-4/+4
* chore: Bump calendar-availability-vue to `v2.1.0`julia.kirschenheuter2024-02-091-6/+6
* chore: Remove `jquery-migrate` and jQuery tooltip polyfills from global scopeFerdinand Thiessen2024-02-091-9/+0
* fix(files): Update `webdav` to 5.3.2 fixing handling of files with XML entiti...Ferdinand Thiessen2024-02-091-4/+4
* Merge pull request #43465 from nextcloud/artonge/fix/bad_revert_commitLouis2024-02-081-9/+21
|\
| * Merge pull request #43438 from nextcloud/bump/bump-ncvue-to-v8.6.2Pytal2024-02-081-9/+21
* | chore!: Remove global `autosize`Ferdinand Thiessen2024-02-081-6/+0
|/
* Revert "Merge branch 'master' of github.com:nextcloud/server"Louis Chemineau2024-02-081-21/+9
* Bump NcVue to `v8.6.2`julia.kirschenheuter2024-02-071-9/+21
* chore: Update `nextcloud-vue-collection` to drop duplicates `@nextcloud/vue` ...Ferdinand Thiessen2024-02-071-991/+123
* chore(deps): Bump @mdi/js from 7.3.67 to 7.4.47dependabot[bot]2024-02-031-4/+4
* chore(deps-dev): Bump @nextcloud/cypressdependabot[bot]2024-02-031-4/+9
* chore(deps): Bump moment from 2.29.4 to 2.30.1dependabot[bot]2024-01-311-4/+4
* chore(deps): Bump marked from 9.1.5 to 11.2.0dependabot[bot]2024-01-301-5/+5
* chore: Update `@nextcloud/vue` to 8.5.1Ferdinand Thiessen2024-01-301-4/+4
* chore(deps): Bump core-js from 3.33.2 to 3.35.1dependabot[bot]2024-01-271-4/+4
* chore: Update `@nextcloud/dialogs` to 5.1.1Ferdinand Thiessen2024-01-271-5/+5
* chore: Upgrade `@nextcloud/router` to 2.2.1Ferdinand Thiessen2024-01-251-5/+5
* chore: Bump @nextcloud/vue to v8.5.0Christopher Ng2024-01-231-8/+332
* Merge pull request #42976 from nextcloud/dependabot/npm_and_yarn/types/wait-o...Ferdinand Thiessen2024-01-201-4/+4
|\
| * chore(deps-dev): Bump @types/wait-on from 5.3.3 to 5.3.4dependabot[bot]2024-01-201-5/+5
* | chore(deps): Update `@nextcloud/dialogs` to 5.1.0Ferdinand Thiessen2024-01-191-83/+53
|/
> * * @NoCSRFRequired * @PublicPage * @BruteForceProtection(action=receiveFederatedShare) * * @param string $shareWith * @param string $name resource name (e.g. document.odt) * @param string $description share description (optional) * @param string $providerId resource UID on the provider side * @param string $owner provider specific UID of the user who owns the resource * @param string $ownerDisplayName display name of the user who shared the item * @param string $sharedBy provider specific UID of the user who shared the resource * @param string $sharedByDisplayName display name of the user who shared the resource * @param array $protocol (e,.g. ['name' => 'webdav', 'options' => ['username' => 'john', 'permissions' => 31]]) * @param string $shareType ('group' or 'user' share) * @param $resourceType ('file', 'calendar',...) * @return Http\DataResponse|JSONResponse * * Example: curl -H "Content-Type: application/json" -X POST -d '{"shareWith":"admin1@serve1","name":"welcome server2.txt","description":"desc","providerId":"2","owner":"admin2@http://localhost/server2","ownerDisplayName":"admin2 display","shareType":"user","resourceType":"file","protocol":{"name":"webdav","options":{"sharedSecret":"secret","permissions":"webdav-property"}}}' http://localhost/server/index.php/ocm/shares */ public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) { // check if all required parameters are set if ($shareWith === null || $name === null || $providerId === null || $owner === null || $resourceType === null || $shareType === null || !is_array($protocol) || !isset($protocol['name']) || !isset($protocol['options']) || !is_array($protocol['options']) || !isset($protocol['options']['sharedSecret']) ) { return new JSONResponse( ['message' => 'Missing arguments'], Http::STATUS_BAD_REQUEST ); } $supportedShareTypes = $this->config->getSupportedShareTypes($resourceType); if (!in_array($shareType, $supportedShareTypes)) { return new JSONResponse( ['message' => 'Share type "' . $shareType . '" not implemented'], Http::STATUS_NOT_IMPLEMENTED ); } $cloudId = $this->cloudIdManager->resolveCloudId($shareWith); $shareWith = $cloudId->getUser(); if ($shareType === 'user') { $shareWith = $this->mapUid($shareWith); if (!$this->userManager->userExists($shareWith)) { $response = new JSONResponse( ['message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()], Http::STATUS_BAD_REQUEST ); $response->throttle(); return $response; } } if ($shareType === 'group') { if (!$this->groupManager->groupExists($shareWith)) { $response = new JSONResponse( ['message' => 'Group "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()], Http::STATUS_BAD_REQUEST ); $response->throttle(); return $response; } } // if no explicit display name is given, we use the uid as display name $ownerDisplayName = $ownerDisplayName === null ? $owner : $ownerDisplayName; $sharedByDisplayName = $sharedByDisplayName === null ? $sharedBy : $sharedByDisplayName; // sharedBy* parameter is optional, if nothing is set we assume that it is the same user as the owner if ($sharedBy === null) { $sharedBy = $owner; $sharedByDisplayName = $ownerDisplayName; } try { $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType); $share = $this->factory->getCloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, '', $shareType, $resourceType); $share->setProtocol($protocol); $provider->shareReceived($share); } catch (ProviderDoesNotExistsException $e) { return new JSONResponse( ['message' => $e->getMessage()], Http::STATUS_NOT_IMPLEMENTED ); } catch (ProviderCouldNotAddShareException $e) { return new JSONResponse( ['message' => $e->getMessage()], $e->getCode() ); } catch (\Exception $e) { $this->logger->error($e->getMessage(), ['exception' => $e]); return new JSONResponse( ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], Http::STATUS_BAD_REQUEST ); } $user = $this->userManager->get($shareWith); $recipientDisplayName = ''; if ($user) { $recipientDisplayName = $user->getDisplayName(); } return new JSONResponse( ['recipientDisplayName' => $recipientDisplayName], Http::STATUS_CREATED); } /** * receive notification about existing share * * @NoCSRFRequired * @PublicPage * @BruteForceProtection(action=receiveFederatedShareNotification) * * @param string $notificationType (notification type, e.g. SHARE_ACCEPTED) * @param string $resourceType (calendar, file, contact,...) * @param string $providerId id of the share * @param array $notification the actual payload of the notification * @return JSONResponse */ public function receiveNotification($notificationType, $resourceType, $providerId, array $notification) { // check if all required parameters are set if ($notificationType === null || $resourceType === null || $providerId === null || !is_array($notification) ) { return new JSONResponse( ['message' => 'Missing arguments'], Http::STATUS_BAD_REQUEST ); } try { $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType); $result = $provider->notificationReceived($notificationType, $providerId, $notification); } catch (ProviderDoesNotExistsException $e) { return new JSONResponse( ['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST ); } catch (ShareNotFound $e) { $response = new JSONResponse( ['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST ); $response->throttle(); return $response; } catch (ActionNotSupportedException $e) { return new JSONResponse( ['message' => $e->getMessage()], Http::STATUS_NOT_IMPLEMENTED ); } catch (BadRequestException $e) { return new JSONResponse($e->getReturnMessage(), Http::STATUS_BAD_REQUEST); } catch (AuthenticationFailedException $e) { $response = new JSONResponse(['message' => 'RESOURCE_NOT_FOUND'], Http::STATUS_FORBIDDEN); $response->throttle(); return $response; } catch (\Exception $e) { return new JSONResponse( ['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()], Http::STATUS_BAD_REQUEST ); } return new JSONResponse($result,Http::STATUS_CREATED); } /** * map login name to internal LDAP UID if a LDAP backend is in use * * @param string $uid * @return string mixed */ private function mapUid($uid) { // FIXME this should be a method in the user management instead $this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]); \OCP\Util::emitHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', ['uid' => &$uid] ); $this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]); return $uid; } }