cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot unlock a document that has been locked for editing

devondan
Champ in-the-making
Champ in-the-making
Hi all,
A Share (4.2.c) user (collaborator) checked out a document for offline editing. While the document was checked out, their role in the Share site was changed to Manager. Now both they and the site admin are unable to cancel the editing of the document. Alfresco.log for both the original document owner and root Admin user throw the same error:

08:42:21,025 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 05030028 JavaException: org.alfresco.repo.security.permissions.AccessDeniedException: 05031956 Access Denied.  You do not have the appropriate permissions to perform this operation.
org.springframework.extensions.webscripts.WebScriptException: 05030028 JavaException: org.alfresco.repo.security.permissions.AccessDeniedException: 05031956 Access Denied.  You do not have the appropriate permissions to perform this operation.
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1053)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
        …
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: 05031956 Access Denied.  You do not have the appropriate permissions to perform this operation.
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:50)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        …


Can anyone please tell me how I can either recover control of or delete this document? And quite why this happened?

Thanks in advance for your advice.
Dan

6 REPLIES 6

ddraper
World-Class Innovator
World-Class Innovator
Hi Dan,

That does sound odd… I've tried to reproduce this problem on my local system (which isn't 4.2c but the latest source code) and I wasn't able to reproduce the problem. This may be a genuine problem on the 4.2c release that has subsequently been fixed. It might be worth you raising an issue as it does sound especially odd that the even the admin can't unlock the file. Have you tried unlocking it from the Alfresco Explorer client (in case there is a bug when accessing the REST API)?

Just to confirm… the user (a collaborator) uploads a file, checks it out for editing, they're then made a site manager and then are unable to cancel editing? This is what I tried and had no problems.

devondan
Champ in-the-making
Champ in-the-making
Hi there,

Yes, your account is correct. To rectify, I tried to restore the document owner as collaborator but this didn't work. Admin has no rights whatsoever. I tried to unlock the document through Alfresco but this didn't work either. Same records in the log files for each attempt.

One thing that I have managed since is really confusing me though. I was able to 'delete' the document (the working copy and the original) using WebDav for the original document owner. So the document is to all intents and purposes gone according to WebDav. However, the document IS still visible through Share and Alfresco…full preview, can be downloaded etc.

Any ideas? Its a pretty recent install as well (less than a few weeks)

<blockcode>
Alfresco Community v4.2.0
4576) schema 6022
Spring Surf and Spring WebScripts - v1.2.0
Release 1207)
</blockcode>
Thanks in advance for your advice.
Dan

ddraper
World-Class Innovator
World-Class Innovator
I can't think of anything off the top of my head I'm afraid. Is this a reproducible problem (e.g. with a new user/new file) on your system or is this just an anomaly with this one file? Presumably you also can't delete the file through Share or Explorer as admin or the user. It does look like although WebDAV has deleted the file locally it's been unable to delete the server copy though (although I don't know much about WebDAV I'm afraid).

devondan
Champ in-the-making
Champ in-the-making
I was able to recreate the problem. Would be happy to provide a full error log if its of interest and/or report the issue.

And in the near term, we'll work around this until our next scheduled update. In the meanwhile, is there a way to 'hard remove' files that have been orphaned from even the admin account? I'm guessing this is not something that is routinely necessary but in this instance, I have locked files that will presumably remain indefinitely otherwise.

Thanks,
Dan

bopolissimus
Confirmed Champ
Confirmed Champ
Hi devondan,

I was bitten by something similar recently and a post here (https://forums.alfresco.com/fr/comment/132871#comment-132871 giving credit where it's due) turned out to be my exact same problem.

The relevant bug tracker entry is here:

https://issues.alfresco.com/jira/browse/MNT-2239?focusedCommentId=214029&page=com.atlassian.jira.plu...

If you didn't "View Original Document" -> "Cancel Edit" however, then yours is a separate issue.

If you have the same issue, flash videos and scripts to drop into Data Dictionary/Scripts are available at the bug tracker.

Good luck.

devondan
Champ in-the-making
Champ in-the-making
Hi there,

We had this issue pop up again today. Same scenario where a user's role is changed while they have a document checked out for offline editing. The document somehow becomes orphaned and even Admin cannot cancel the edit, permanently locking the document.

I've created a ticket in JIRA to see if this is a genuine bug. I certainly have two entirely orphaned documents now that I can't do anything with because they are locked for offline editing.

https://issues.alfresco.com/jira/browse/ALF-19206