cancel
Showing results for 
Search instead for 
Did you mean: 

Doc control and restricting permissions

ph73nt
Champ in-the-making
Champ in-the-making
Dear list,

I'm trialling Alfresco for document control and I like it. I'm particularly impressed with the "share" interface, but it's not quite restrictive enough out-of-the-box. I've set up a folder in the default repository (this could be done in a site if necessary) for active (or published) documents. In this directory nothing should be editable without checking-out the document into another directory for draft revisions (no dodgy edit offline, please). So anybody should be able to add a document to the "active documents" directory, but once added it should be sort of frozen, unless a specific route is taken.

Within the Alfresco system and ethos, what is the best way to accomplish this?
- Can I remove some of the contextual buttons (on the more… menu)?
- …or am I better off relying on the folder permissions?
- Can a check-out be done within a workflow?
- Should I create a rule to make all documents belong to admin when moved into the active docs folder?

I would appreciate your feedback and advice,

regards, Neil
4 REPLIES 4

muralie39
Champ on-the-rise
Champ on-the-rise
you can write the custom java script to remove the buttons..


how can check-out achieve in work flow?

_sax
Champ in-the-making
Champ in-the-making
To check ou a document during a workflow, a java script in the processdefintion must be provided.
The API is documented here: http://wiki.alfresco.com/wiki/3.4_JavaScript_API#Check_in.2FCheck_out_API
The line would be roughly like bpm_workflow_package.item.checkout() where i is the appropriate file # in the workflow package.
A user could as well manually check out a file during a workflow via the my task interface of the JSP (non-Share) client.
But the checked out working copy has to be put in the right space via the user that has to provide that folder during the checkout process.

With a javascript, you can redirect it automatically to where you want:
ScriptNode checkout(ScriptNode destination)
Performs a checkout of the node to the specified destination, returning the resulting working copy node.

To be able to do this, the script may be required to run as admin, because the user that initiates the workflow
should, as you stated, not be allowed to edit a document. A user without writing rights on a space therefore cannot write a working copy,
but may be able to do so in another folder, the one provided in the checkout script. If needed, here's how you run a script as admin.
http://wiki.alfresco.com/wiki/WorkflowAdministration#Run_As

ph73nt
Champ in-the-making
Champ in-the-making
That's useful info, thanks.

Neil

ph73nt
Champ in-the-making
Champ in-the-making
Hmmm… having trouble checking out documents within the workflow. Everytime I try to reference a document with anything other than bpm_package.children.length I get an error. I've detailed this in a new thread (http://forums.alfresco.com/en/viewtopic.php?f=34&t=37009).

Cheeres, Neil