onlyoffice-nextcloud icon indicating copy to clipboard operation
onlyoffice-nextcloud copied to clipboard

Expose Onlyoffice document permissions in config

Open mmccarn opened this issue 5 years ago • 2 comments

(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

mmccarn avatar Jun 15 '19 13:06 mmccarn

Hi @mmccarn We are discussing with Nextcloud the possibility of expanding the list of rights.

LinneyS avatar Dec 27 '19 08:12 LinneyS

I want this feature, too!

metorm avatar Apr 24 '24 14:04 metorm