Question

I have created a workflow with a transition 'To print the current document'. I wish to create a content rule to print the current file which is being viewed using collective.document viewer. I do not see any action where I can specify to print the current document/file (from its URL) when the workflow state is changed for the content rule. Can you please guide me. I found the enter link description here

but it is for Plone v.3 while I am using v. 4.1.4 Unified installer standalone install.

Moreover I find this a little tough to do it. Definitely there might be some standard available by now. I want to allow only certain users to review the workflow to print the file.

Others are only readers, who cannot download or print the file, but only read online.

I have overridden the at_download and some customization to the document viewer icons to prevent download and changed the global settings for document viewer without allowing the visibility of the viewer's 'sidebar'.

Please guide if there is any other alternate solution for this use case.

Was it helpful?

Solution

After several tries, probable combinations of access permissions, workflows, content rules and other settings finally able to achieve the solution for the use-case.

Requirement: A folder accessible by only 2 users: 1 can only read, other can only print the required uploaded files in that folder. Every folder is private and is only visible for 2 users. Other folders are not visible to these users.

Solution: 1. The site manager/site admin creates members for the Plone site. 2. Create a private state workflow for folders as default. This has only 1 state i.e private and no transitions. 3. Create the folder accessible by 2 users i.e reader1 and printer1. Give 'sharing' permissions to reader1 local 'view' access. printer1 has 'review' and 'view' access in this folder. 4. Create a sub-folder in this folder viz. 'Print'. Give 'edit' and 'view' permissions to user printer1 only. 5. Create a workflow (print_workflow) with 2 states 'private' and 'copied to print' and transition 'copy to print' 6. Apply this print_workflow as default to file content types as default. 7. Create content rule to copy the file to the sub-folder 'Print', when the workflow state changes from 'private' to 'copied to print' 8. User printer1 can edit the 'DocumentViewer' settings to enable 'Show sidebar' which contains the hyperlink to print/download the file.

Important: 1. The 'Manager' has to hide the 'Sharing' tab once the folders and required permissions for the users are set for the entire site. In case a permission needs to be added, only he will be able to do it.

To hide the 'Sharing' tab, using ZMI, portal_actions/object/local_roles/ un-check the 'Visible' option and save. Whenever any permissions have to be given, this has to be enabled, permissions given and 'visibility' disabled again.

  1. Do not enable user folders for the site. This will allow the users to copy/paste the file into his folder and allow sharing/downloading etc

  2. Global document Viewer settings should not allow 'show Side bar' for the plone site.

Plone is awesome. There's so much to learn!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top