Skip to content

Commit

Permalink
Merge pull request #3300 from nextcloud/fix/settings/config-handling-…
Browse files Browse the repository at this point in the history
…stable27
  • Loading branch information
provokateurin authored Sep 30, 2024
2 parents 08a5928 + 716c5c6 commit 6063ff7
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 161 deletions.
11 changes: 11 additions & 0 deletions lib/Controller/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use OCA\GroupFolders\Service\DelegationService;
use OCA\GroupFolders\Service\FoldersFilter;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\Files\IRootFolder;
Expand Down Expand Up @@ -160,6 +161,7 @@ private function getRootFolderStorageId(): ?int {
* @RequireGroupFolderAdmin
* @NoAdminRequired
*/
#[PasswordConfirmationRequired]
public function addFolder(string $mountpoint): DataResponse {
$id = $this->manager->createFolder(trim($mountpoint));
return new DataResponse(['id' => $id]);
Expand All @@ -169,6 +171,7 @@ public function addFolder(string $mountpoint): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function removeFolder(int $id): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -184,6 +187,7 @@ public function removeFolder(int $id): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function setMountPoint(int $id, string $mountPoint): DataResponse {
$this->manager->setMountPoint($id, trim($mountPoint));
return new DataResponse(['success' => true]);
Expand All @@ -193,6 +197,7 @@ public function setMountPoint(int $id, string $mountPoint): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function addGroup(int $id, string $group): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -206,6 +211,7 @@ public function addGroup(int $id, string $group): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function removeGroup(int $id, string $group): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -219,6 +225,7 @@ public function removeGroup(int $id, string $group): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function setPermissions(int $id, string $group, int $permissions): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -233,6 +240,7 @@ public function setPermissions(int $id, string $group, int $permissions): DataRe
* @RequireGroupFolderAdmin
* @throws \OCP\DB\Exception
*/
#[PasswordConfirmationRequired]
public function setManageACL(int $id, string $mappingType, string $mappingId, bool $manageAcl): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -246,6 +254,7 @@ public function setManageACL(int $id, string $mappingType, string $mappingId, bo
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function setQuota(int $id, int $quota): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -259,6 +268,7 @@ public function setQuota(int $id, int $quota): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function setACL(int $id, bool $acl): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand All @@ -272,6 +282,7 @@ public function setACL(int $id, bool $acl): DataResponse {
* @NoAdminRequired
* @RequireGroupFolderAdmin
*/
#[PasswordConfirmationRequired]
public function renameFolder(int $id, string $mountpoint): DataResponse {
$response = $this->checkFolderExists($id);
if ($response) {
Expand Down
159 changes: 108 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@nextcloud/stylelint-config": "^2.3.0",
"@nextcloud/webpack-vue-config": "^5.5.1",
"@types/bootstrap": "^5.2.6",
"@types/jquery": "^3.5.16",
"@types/react": "^17.0.43",
"@types/react-dom": "^18.0.3",
"@types/webpack": "^4.41.26",
Expand All @@ -39,6 +38,7 @@
"@nextcloud/event-bus": "^3.0.2",
"@nextcloud/files": "^3.0.0-beta.9",
"@nextcloud/l10n": "^2.1.0",
"@nextcloud/password-confirmation": "4.0.4",
"@nextcloud/router": "^2.1.1",
"@nextcloud/vue": "^7.11.4",
"nextcloud-server": "^0.15.10",
Expand Down
Loading

0 comments on commit 6063ff7

Please sign in to comment.