Skip to content

Commit a1f1d99

Browse files
authored
Merge pull request #55899 from nextcloud/backport/55796/stable31
[stable31] fix(FilesPicker): Prevent selection of nodes without create permission
2 parents 082425b + 1d335ec commit a1f1d99

File tree

274 files changed

+1214
-970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+1214
-970
lines changed

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ async function openFilePickerForAction(
222222
// We don't want to show the current nodes in the file picker
223223
return !fileIDs.includes(n.fileid)
224224
})
225+
.setCanPick((n) => {
226+
const hasCreatePermissions = (n.permissions & Permission.CREATE) === Permission.CREATE
227+
return hasCreatePermissions
228+
})
225229
.setMimeTypeFilter([])
226230
.setMultiSelect(false)
227231
.startAt(dir)
@@ -237,7 +241,6 @@ async function openFilePickerForAction(
237241
label: target ? t('files', 'Copy to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Copy'),
238242
type: 'primary',
239243
icon: CopyIconSvg,
240-
disabled: selection.some((node) => (node.permissions & Permission.CREATE) === 0),
241244
async callback(destination: Node[]) {
242245
resolve({
243246
destination: destination[0] as Folder,

core/css/server.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/server.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/1252-1252.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/1252-1252.js.license

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ SPDX-FileCopyrightText: @nextcloud/dialogs developers
3737

3838

3939
This file is generated from multiple sources. Included packages:
40+
- @nextcloud/browser-storage
41+
- version: 0.5.0
42+
- license: GPL-3.0-or-later
4043
- @nextcloud/auth
41-
- version: 2.5.1
44+
- version: 2.5.3
4245
- license: GPL-3.0-or-later
4346
- @nextcloud/axios
44-
- version: 2.5.1
47+
- version: 2.5.2
4548
- license: GPL-3.0-or-later
4649
- @nextcloud/browser-storage
4750
- version: 0.4.0
@@ -50,7 +53,7 @@ This file is generated from multiple sources. Included packages:
5053
- version: 1.2.0
5154
- license: GPL-3.0-or-later
5255
- @nextcloud/dialogs
53-
- version: 6.3.1
56+
- version: 6.4.1
5457
- license: AGPL-3.0-or-later
5558
- semver
5659
- version: 7.6.3
@@ -92,7 +95,7 @@ This file is generated from multiple sources. Included packages:
9295
- version: 11.3.0
9396
- license: MIT
9497
- axios
95-
- version: 1.9.0
98+
- version: 1.12.2
9699
- license: MIT
97100
- base64-js
98101
- version: 1.5.1

dist/1252-1252.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/1642-1642.js.license

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
2222

2323

2424
This file is generated from multiple sources. Included packages:
25+
- @nextcloud/browser-storage
26+
- version: 0.5.0
27+
- license: GPL-3.0-or-later
2528
- @nextcloud/auth
26-
- version: 2.5.1
29+
- version: 2.5.3
2730
- license: GPL-3.0-or-later
2831
- @nextcloud/axios
29-
- version: 2.5.1
30-
- license: GPL-3.0-or-later
31-
- @nextcloud/browser-storage
32-
- version: 0.4.0
32+
- version: 2.5.2
3333
- license: GPL-3.0-or-later
3434
- semver
3535
- version: 7.6.3
@@ -59,7 +59,7 @@ This file is generated from multiple sources. Included packages:
5959
- version: 11.3.0
6060
- license: MIT
6161
- axios
62-
- version: 1.9.0
62+
- version: 1.12.2
6363
- license: MIT
6464
- base64-js
6565
- version: 1.5.1

dist/1656-1656.js.license

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ SPDX-FileCopyrightText: @nextcloud/dialogs developers
3434

3535

3636
This file is generated from multiple sources. Included packages:
37+
- @nextcloud/browser-storage
38+
- version: 0.5.0
39+
- license: GPL-3.0-or-later
3740
- @nextcloud/auth
38-
- version: 2.5.1
41+
- version: 2.5.3
3942
- license: GPL-3.0-or-later
4043
- @nextcloud/axios
41-
- version: 2.5.1
42-
- license: GPL-3.0-or-later
43-
- @nextcloud/browser-storage
44-
- version: 0.4.0
44+
- version: 2.5.2
4545
- license: GPL-3.0-or-later
4646
- @nextcloud/capabilities
4747
- version: 1.2.0
4848
- license: GPL-3.0-or-later
4949
- @nextcloud/dialogs
50-
- version: 6.3.1
50+
- version: 6.4.1
5151
- license: AGPL-3.0-or-later
5252
- semver
5353
- version: 7.6.3
@@ -98,7 +98,7 @@ This file is generated from multiple sources. Included packages:
9898
- version: 4.5.0
9999
- license: Apache-2.0
100100
- axios
101-
- version: 1.9.0
101+
- version: 1.12.2
102102
- license: MIT
103103
- base64-js
104104
- version: 1.5.1

dist/2452-2452.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/2452-2452.js.license

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ SPDX-FileCopyrightText: Anthony Fu <https://github.com/antfu>
2222

2323

2424
This file is generated from multiple sources. Included packages:
25+
- @nextcloud/browser-storage
26+
- version: 0.5.0
27+
- license: GPL-3.0-or-later
2528
- @nextcloud/auth
26-
- version: 2.5.1
29+
- version: 2.5.3
2730
- license: GPL-3.0-or-later
2831
- @nextcloud/axios
29-
- version: 2.5.1
30-
- license: GPL-3.0-or-later
31-
- @nextcloud/browser-storage
32-
- version: 0.4.0
32+
- version: 2.5.2
3333
- license: GPL-3.0-or-later
3434
- semver
3535
- version: 7.6.3
@@ -53,7 +53,7 @@ This file is generated from multiple sources. Included packages:
5353
- version: 11.3.0
5454
- license: MIT
5555
- axios
56-
- version: 1.9.0
56+
- version: 1.12.2
5757
- license: MIT
5858
- base64-js
5959
- version: 1.5.1

0 commit comments

Comments
 (0)