Commit 7659dfd
committed
feat(admin): let instances choose which pad types are offered
Add two settings, Protected pads and Public pads, both enabled by default
so existing installations are unaffected. The labels keep the vocabulary
the API and the binding table already use.
Enforcement is server-side, matching allow_external_pads:
PadCreationService covers the API and embed-create paths,
materializeTemplateInto() the templates, and PadBootstrapService guards
its `binding === null` branch -- otherwise an empty .pad plus /initialize
was a way around the setting. The check deliberately stays out of
provisionPadId(), which also re-initialises files that already have a
binding.
Existing pads of a disabled type keep working; only creation is affected.
Turning both off is allowed. A template carrying a disabled mode is
created in the enabled mode rather than failing, and Nextcloud's own
"+ New pad" entry is hidden when protected pads are off, since it always
produces one. External pads stay independent.
The setting decides what the app offers -- it is not a hard boundary
against hand-crafted .pad files. Recovering an orphaned pad from its
snapshot still re-provisions the mode recorded in the file, because
rescuing existing content wins.
Includes de/es/fr translations and doc updates.
Closes #175.1 parent 0751fa0 commit 7659dfd
54 files changed
Lines changed: 897 additions & 31 deletions
File tree
- docs
- js
- l10n
- lib
- Controller
- Exception
- Listeners
- Service
- Settings
- src
- files
- lib
- templates
- tests
- js/files
- phpunit
- stubs/OCP/Files/Template
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | | - | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments