cancel
Showing results for 
Search instead for 
Did you mean: 

LockService availability on RM Module

gernot
Champ in-the-making
Champ in-the-making
Hi,
Is the LockService unavailable on the RM module?
Calling org.alfresco.service.cmr.lock.LockService.getLockStatus(NodeRef) for a node belonging to the RM site always throws an AccessDeniedException.
I also noticed that the DOD5015 project doesn't contain any reference to the lockservice.

Thanks in advance,
Gernot
5 REPLIES 5

carlos_miguens
Champ on-the-rise
Champ on-the-rise
Hi Gernot

I'm not a developer but I'm assuming that you are doing this effectively to "checkout" a record. RM does not support checkout, once records are in the system they cannot be changed, some of the metadata can with the right user capabilities.

If you want to add a new version of a record you need to create the new version as a new node in the system and then create a relationship "Versions/VersionedBy" between the two records.

mikeh
Star Contributor
Star Contributor
org.alfresco.service.cmr.lock.LockService.getLockStatus=ACL_NODE.0.sys:base.ReadProperties,RM_ABSTAIN
There's no specific security code for getLockStatus(), but you will need the correct RM-based permissions for the node, which are different to the permissions in other parts of the Repository.

Thanks,
Mike

gernot
Champ in-the-making
Champ in-the-making
I get this error even though I added user 'admin' to the Records Management Administrator group.
Normally, I should be able to get the lockstatus…
Regards,
Gernot

mikeh
Star Contributor
Star Contributor
Please post the full exception.

Thanks,
Mike

gernot
Champ in-the-making
Champ in-the-making
org.alfresco.repo.security.permissions.AccessDeniedException: 11090006 Access Denied.  You do not have the appropriate permissions to perform this operation.
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:237)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:204)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy48.getLockStatus(Unknown Source)
   .
        .
        .
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
   at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:93)
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:237)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:204)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:152)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy48.getLockStatus(Unknown Source)