Is it possible to change the default permission on share links to 'File Drop' instead of 'Read Only'?
So whenever I create a new folder and then create a share link for the folder, the permission defaults to 'File drop (upload only)' instead of 'Read only'?
If this isn't currently possible via the GUI, can anyone point me in the right direction to the code responsible for creating the share links? Perhaps I can tweak the code on my installation to create share links as 'File drop' links by default?
Thanks.
GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/3234 (Direct link to files within folder with share link), https://github.com/nextcloud/server/issues/10358 (Shared folder only displaying one file), https://github.com/nextcloud/server/issues/721 (Improvements to the share file interface), https://github.com/nextcloud/server/issues/9628 (Shared file saved at wrong user.), and https://github.com/nextcloud/server/issues/10017 (Show moved shared file in "Deleted files").
@nextcloud/designers Does that make sense from an UX point of view? cc @karlitschek
Hmm. Not sure we should change the default because it is really a different behavior that people might not expect. Maybe another setting to change the default? But this is maybe overkill
@karlitschek - I agree that the default shouldn't or doesn't need to be changed but a setting to allow administrators to configure the default would be very useful.
To change the default permission on all share links per user or even restrict certain users to only create 'file drop' share links (and not read only or read/edit links) would be even better.
_(ie. User A can create share links with any permission but by default they are 'file drop' links. User B can ONLY create 'file drop' links with 'read only' and 'read/edit' options disabled or grayed out)._
Would it be possible for me to adjust the default permission for share links myself via editing code on my end for my deployment? If so, can someone point me to the file / code that controls the creation of the share links and/or share link permissions?
Would it be possible for me to adjust the default permission for share links myself via editing code on my end for my deployment? If so, can someone point me to the file / code that controls the creation of the share links and/or share link permissions?
https://github.com/nextcloud/server/blob/c435bfe703cd2cd059e478cc381d7249038c04e6/core/js/sharedialoglinkshareview.js#L518-L528 <- there the view is filled with the actual data.
https://github.com/nextcloud/server/blob/c435bfe703cd2cd059e478cc381d7249038c04e6/core/js/sharedialoglinkshareview.js#L64-L80 <- there the list is rendered.
None of the two above are the "default" sharing permission, but if you want you could tweak them (this is only the frontend part - the API would still allow other options (i.e. in the mobile or desktop clients).
Thanks for providing me with that code. I've played around with it a bit to make it check the 'File Drop' radio button by default but this doesn't actually affect or change the permission of the share. It appears to only be a cosmetic change.
When you select the different radio buttons, the permissions change on the fly, which is great. But what part of the code is responsible for or called upon in order to actually make the permission change? I'm wondering if maybe that is what I need to look at in order to achieve my goal?
maybe creating a custom app which injects javascript code to check the other radio button might be the cleanest way?
Is there no way in the code that is already there to change the default permissions applied to new share links? Surely there is something in the code already that is in charge of setting the links to 'Read Only' (OC.PERMISSION_READ)? Can I not change this to be 'File Drop' (OC.PERMISSION_UPDATE) instead?
I believe I've found the javascript files that reference default permissions but am unsure which line I can change to force new links to set to OC.PERMISSION_UPDATE (file drop only).
I tried changing the following line to OC.PERMISSION_UPDATE (instead of _ALL) as I believe this is called upon by the shareitemmodel.js file? This didn't work for me though.
https://github.com/nextcloud/server/blob/2e36069e24406455ad3f3998aa25e2a949d1402a/apps/files_sharing/lib/Capabilities.php#L90
Any ideas?
On the back of this, I've just upgraded to version 14 and noticed that there are now some default share permissions within the Settings > Sharing page.
Can anyone explain what the new ‘default share permissions’ within Settings > Sharing in NC 14 is and how they work?
Can these new ‘default share permissions’ achieve the results I described in this threads original post?
Can these new ‘default share permissions’ achieve the results I described in this threads original post?
Those only apply to shares directly to a user or a group, but not to link shares. At least not yet. cc @nextcloud/sharing
Can these new ‘default share permissions’ achieve the results I described in this threads original post?
Those only apply to shares directly to a user or a group, but not to link shares. At least not yet. cc @nextcloud/sharing
Thanks for confirming.
I think the ability for admins to configure default share link permissions would be a useful future at some point.
As this sounds like a nice feature, the requests for this are quite low. Currently there a no plans to implement such a feature. Thus I will close this ticket for now. This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.
If you wish to have this feature implemented by the Nextcloud GmbH there is the option for consulting work on top of your Nextcloud Enterprise subscription to get your features implemented.
Is there a way to adjust whom it is that the files are being shared to? It would seem that when we are using this software, It shows "You are sharing your files with (Name of Administrator who set up the account)" Is there any way to adjust it to say something like "You are sharing your files with (Business Name)"?
@ThatHostingCo it shows the name of the user who created the link, not of the administrator. If you want a business name shown, you could simply create a user account with the business name as display name and the logo as avatar.
Most helpful comment
As this sounds like a nice feature, the requests for this are quite low. Currently there a no plans to implement such a feature. Thus I will close this ticket for now. This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.
If you wish to have this feature implemented by the Nextcloud GmbH there is the option for consulting work on top of your Nextcloud Enterprise subscription to get your features implemented.