cancel
Showing results for 
Search instead for 
Did you mean: 

force users to checkout documents prior to editing?

jason_botwick
Champ in-the-making
Champ in-the-making
I'm curious if there is a built-in configuration or setting that would force a certain role (or maybe even all users) to execute a check out of a document prior to being allowed to edit it. In our environment, it's problematic to simply allow users to edit documents without checking them out, since this inevitably leads to one person overwriting another's changes because they forgot to check something out.

So can this easily be done through configuration? If not, are there any ideas out there as to how to accomplish this? Scripting against the API leaps to mind, but before I dig into that, I'd like to make sure there's not some easy setting I'm overlooking.

If anyone has ideas on this or has run into this issue, please post how you handled it.

Thanks,
Jason
10 REPLIES 10

gavinc
Champ in-the-making
Champ in-the-making
You could update the evaluator for the edit action to also check that the node is checked out before allowing the edit option to appear in the UI.

EditDocHttpEvaluator is the default evaluator, take a look at this, customise it and override the configuration for the "edit_doc_http" action.

richmitc
Champ in-the-making
Champ in-the-making
Would a rule that executes check out on update work?  Or would that not fire until save?  Anyway, what would happen if they already had it checked out?  Just thinking….

jason_botwick
Champ in-the-making
Champ in-the-making
Thanks for the suggestions.

I don't think messing with the edit_doc_http action would work. If there is a reachable CIFS share, people could just avoid the web client all together, and therefore circumvent any such rules instantiated inside the web client, no?

Anyway, I was hoping there was an easier way than having to mess around in the source. I mean, it seems like it should be a matter of configuring permissions and actions. After all, there are already built-in warnings in some places for users to check out documents when they try to edit them.

Am I wrong in thinking this is a common problem in the area of document management?

jason_botwick
Champ in-the-making
Champ in-the-making
going once . . .

andy
Champ on-the-rise
Champ on-the-rise
Hi

You could remove "write_content" from most users by removing this from the permissions - you would have to list everything but "write_content" for the coordinator role (people need "write properties"  to check the doc out …). Then add write_content as a global permission to ROLE_LOCK_OWNER.

This should mean to write to the content they would have to check out and own the checked out copy.

Regards

Andy

tyve
Champ in-the-making
Champ in-the-making
I've tried the solution with rights suggested in this thread but can't get my custom role to allow changes of properties:

New role Projektledare (Project manager in Swedish):

      <!– The Projektledare permission allows read and checkout to everything by default.                  –>
      <permissionGroup name="Projektledare" allowFullControl="false" expose="true" >
          <includePermissionGroup permissionGroup="Read" type="sys:base" />
          <includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
          <includePermissionGroup type="sys:base" permissionGroup="WriteProperties"/>
      </permissionGroup>

Also added to <permissionSet type="cm:content" expose="selected">:

      <permissionGroup name="Projektledare" extends="true" expose="true"/>


   <!– Write content is granted to the lock owner                                       –>
   <globalPermission permission="WriteContent" authority="ROLE_LOCK_OWNER"/>

Projektledare is added to i18n and works except that it's not allowed to change properties or checkout content. I've tried to add other permission groups like addContent or Delete and they give added rights to the role. What should I change to allow Projektledare to checkout content?

tyve
Champ in-the-making
Champ in-the-making
Found the answer myself:

Had to change requredPermission from Write to WriteProperties on _Lock


      <!– Low level lock permission                                                     –>
      <permission name="_Lock" requiresType="false" expose="false">
        <grantedToGroup permissionGroup="Lock" />
        <requiredPermission on="node" type="sys:base"  name="WriteProperties"/>
      </permission>

dinger
Champ in-the-making
Champ in-the-making
I've just tried this out and it works really well!

However, I'd like users to be able to create content but then only edit it by checking it out… I guess I could add a rule that added the ownable aspect to an added item which would stop the user being able to modify it. Evidently you need content write permissions to add a document in a space.

Any thoughts?

Rob

gavinc
Champ in-the-making
Champ in-the-making
There's actually some changes coming in the next days that will give the functionality you're requesting, basically there will be an edit offline action which will first perform a checkout.

Keep checking SVN and/or the nightly builds…