Consider admin defaults when creating shares
The current share logic always uses the default BUNDLED_PERMISSIONS.ALL which includes everything. This commit updates share creation logic to use defaultPermissions if set by admin for the creation of new shares.
Resolves: https://github.com/nextcloud/server/issues/42835
Something else that has come up while working on this in relation to maintaining "Allow editing" and "Default permissions"
- It turns out when no permissions are set on the admin, the default permission is "1" which is ready only. So changing "Allow editing" to "Default permissions" which has the probability to be 1, most of the time would make little sense with read only just at the top, that is, "Read only" (first option), second option (Default permissions, still read only)
So, the brainstorming is not over it seems, the second path, is simply to add "Default permissions" as a new option IF it is different from READ only (1) as well as different from "Allow editing" (31)
cc: @jancborchardt
As far as I can see, the issue reported at https://github.com/nextcloud/server/issues/42835 should be fixed via code and does not need a new entry in this list of presets. These are merely default share permissions set by the admin and that’s that.
- If the permissions set by the admin are the same as "View only", preselect that
- If the permissions set by the admin are the same as "Allow editing", preselect that
- If the permissions set by the admin are anything else, preselect "Custom permissions" with the relevant subline
But we should not replace an entry of those with "Default permissions" or anything like that.
As far as I can see, the issue reported at https://github.com/nextcloud/server/issues/42835 should be fixed via code and does not need a new entry in this list of presets. These are merely default share permissions set by the admin and that’s that.
Sure, it does not necessarily need a new entry in the list of presets. But definitely needs making changes to how the presets work to avoid confusion. Adding another option or updating language are just other solutions paths suggested.
So the new implication is that "Allow editing" is not always the selected/default option as is the case now. It would be dynamically selected.
The only difference between this and my last suggestion is that no new entry would be added. To mitigate the issue of clearly understanding what default permissions are, I think it would be nice to have a way for the user to know that whatever permission was pres-elected for them is the default. This can be done by simply adding something like Default in parenthesis. (Default)
/compile /
/compile
CI is a bit slow at the moment due to 28.0.2 release I guess, you could short cut by compiling locally and submit the assets.
/compile amend /
PHP unit failures unrelated.
/backport to stable28
/backport to stable27