Skip to content

Commit

Permalink
Merge pull request #48976 from nextcloud/backport/48788/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: add PasswordConfirmationRequired to the external storages mentioned in review
  • Loading branch information
yemkareems authored Oct 29, 2024
2 parents a9dd34a + b9b23a7 commit c5a15be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IConfig;
use OCP\IGroupManager;
Expand Down Expand Up @@ -69,6 +70,7 @@ public function __construct(
*
* @return DataResponse
*/
#[PasswordConfirmationRequired]
public function create(
$mountPoint,
$backend,
Expand Down Expand Up @@ -134,6 +136,7 @@ public function create(
*
* @return DataResponse
*/
#[PasswordConfirmationRequired]
public function update(
$id,
$mountPoint,
Expand Down
2 changes: 2 additions & 0 deletions apps/files_external/lib/Controller/StoragesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use OCA\Files_External\Service\StoragesService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\Files\StorageNotAvailableException;
use OCP\IConfig;
Expand Down Expand Up @@ -300,6 +301,7 @@ public function show($id, $testOnly = true) {
*
* @return DataResponse
*/
#[PasswordConfirmationRequired]
public function destroy($id) {
try {
$this->service->removeStorage($id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IConfig;
use OCP\IGroupManager;
Expand Down Expand Up @@ -136,6 +137,7 @@ public function show($id, $testOnly = true) {
* @return DataResponse
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function update(
$id,
$backendOptions,
Expand Down

0 comments on commit c5a15be

Please sign in to comment.