onlyoffice-nextcloud
onlyoffice-nextcloud copied to clipboard
Expose Onlyoffice document permissions in config
(my) objective:
- Use Nextcloud for sharing of sensitive data that I don't trust in Google, Dropbox or OneDrive
- Allow users to view the shared files without leaking sensitive information into their local downloads or web cache.
- [future - not covered here] allow data download only from approved devices - so that users can view the information on the mobile or home computer, but cannot download it anywhere outside of the office.
tentative solution:
- Install Onlyoffice for document viewing
- Configure onlyoffice to prevent editing, downloading, or printing of content
how: Option 1: global settings
- edit NC/apps/onlyoffice/controller/editorcontroller.php to force permissions. I have done this manually on my system based on the Onlyoffice API Permissions documentation by adding the code below at line 586, which seems to do what I want:
if (!array_key_exists("permissions", $params["document"])) {
$params["document"]["permissions"] = [];
}
$params["document"]["permissions"]["comment"] = false;
$params["document"]["permissions"]["download"] = false;
$params["document"]["permissions"]["edit"] = false;
$params["document"]["permissions"]["fillForms"] = false;
$params["document"]["permissions"]["print"] = false;
$params["document"]["permissions"]["review"] = false;
Option 2: expose the above settings in the Onlyoffice app configurations
Option 3: expose the above settings in the ONLYOFFICE settings plus another setting for enhanced permissions by user group
Option 4 (not supported by NC core, as far as I know): restrict maximum permissions by device. If added to option 3, users with enhanced permissions would only be able to leverage those permissions if they are also on an authorized device
Hi @mmccarn We are discussing with Nextcloud the possibility of expanding the list of rights.
I want this feature, too!