Skip to content

Commit

Permalink
fix: add PasswordConfirmationRequired to create user storages endpoint
Browse files Browse the repository at this point in the history
* add PasswordConfirmationRequired to update and delete method

Signed-off-by: yemkareems <yemkareems@gmail.com>
  • Loading branch information
yemkareems authored and susnux committed Oct 30, 2024
1 parent fa6001d commit 0de59aa
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions apps/files_external/lib/Controller/UserStoragesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\UserStoragesService;
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 @@ -120,9 +122,9 @@ public function show($id, $testOnly = true) {
* @param array $mountOptions backend-specific mount options
*
* @return DataResponse
*
* @NoAdminRequired
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function create(
$mountPoint,
$backend,
Expand Down Expand Up @@ -176,9 +178,9 @@ public function create(
* @param bool $testOnly whether to storage should only test the connection or do more things
*
* @return DataResponse
*
* @NoAdminRequired
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function update(
$id,
$mountPoint,
Expand Down Expand Up @@ -226,11 +228,10 @@ public function update(

/**
* Delete storage
*
* @NoAdminRequired
*
* {@inheritdoc}
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function destroy($id) {
return parent::destroy($id);
}
Expand Down

0 comments on commit 0de59aa

Please sign in to comment.