Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] fix: add PasswordConfirmationRequired to the external storages mentioned in review #48975

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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 @@ -90,6 +91,7 @@ public function __construct(
*
* @return DataResponse
*/
#[PasswordConfirmationRequired]
public function create(
$mountPoint,
$backend,
Expand Down Expand Up @@ -155,6 +157,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 @@ -37,6 +37,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 @@ -387,6 +388,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 @@ -35,6 +35,8 @@
use OCA\Files_External\NotFoundException;
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 @@ -154,9 +156,9 @@ public function show($id, $testOnly = true) {
* @param bool $testOnly whether to storage should only test the connection or do more things
*
* @return DataResponse
*
* @NoAdminRequired
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired]
public function update(
$id,
$backendOptions,
Expand Down
Loading