Skip to content

Conversation

@PVince81
Copy link
Member

@PVince81 PVince81 commented Dec 6, 2021

Introduce a new config option to prevent web UI admins to create
or edit external storages of type "local".

Fixes #29973

  • TEST: occ command can create
  • TEST: cannot create local storages in web UI
  • TEST: existing local storages appear grey in web UI
  • TEST: test when allowed

⚠️ this will change the default, by default "Local" will not be visible so one needs to enable it where needed

Inspired from:

@PVince81
Copy link
Member Author

PVince81 commented Dec 6, 2021

I need to fix some tests:


1) OCA\Files_External\Tests\Controller\GlobalStoragesControllerTest::testAddStorage
--


ArgumentCountError:
 Too few arguments to function 
OCA\Files_External\Controller\GlobalStoragesController::__construct(), 7
 passed in 
/drone/src/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
 on line 59 and exactly 8 expected

@PVince81 PVince81 added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 6, 2021
@PVince81 PVince81 force-pushed the enh/29973/option-disallow-local-storage branch from 6c7f46d to 9ccf011 Compare December 6, 2021 16:55
@PVince81 PVince81 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 6, 2021
@PVince81
Copy link
Member Author

PVince81 commented Dec 6, 2021

build is passing now, please review

Introduce a new config option to prevent web UI admins to create
or edit external storages of type "local".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81 PVince81 force-pushed the enh/29973/option-disallow-local-storage branch from ba72fc9 to ea30297 Compare December 15, 2021 08:23
@PVince81
Copy link
Member Author

fixed the readOnly var, I replaced it with an inline statement now as it was used only in one location
and removed console.log and redid a quick test

@PVince81 PVince81 requested review from artonge and removed request for icewind1991 December 15, 2021 08:25
@PVince81 PVince81 merged commit 6c424fb into master Dec 16, 2021
@PVince81 PVince81 deleted the enh/29973/option-disallow-local-storage branch December 16, 2021 10:12
@icewind1991
Copy link
Member

/backport to stable23

@icewind1991
Copy link
Member

/backport to stable22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow creation of "local" storage for web UI admins

6 participants