cancel
Showing results for 
Search instead for 
Did you mean: 

Disconnect 2 nodes from parent-child association

alex_lu
Champ in-the-making
Champ in-the-making
Hello guys,

I am trying to disconnect 2 nodes which have parent-child association. I'm using nodeService.removeSecondaryChildAssociation, but I'm getting permission exception. This is all done as admin.

Does anyone know how to work around it?

"message" : "00040001 Access Denied.  You do not have the appropriate permissions to perform this operation.[Ljava.lang.StackTraceElement;@14ea6da9", 
  "exception" : "org.alfresco.repo.security.permissions.AccessDeniedException - 00040001 Access Denied.  You do not have the appropriate permissions to perform this operation.",
 
  "callstack" :
  [
       ""      ,"net.sf.acegisecurity.AccessDeniedException: Access is denied."
      ,"net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)"
      ,"net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)"
      ,"net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)"
      ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)"
      ,"org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:43)"
      ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)"
      ,"org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:135)"
      ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)"
      ,"org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)"
      ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)"
      ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)"
      ,"$Proxy10.removeSeconaryChildAssociation(Unknown Source)"

Thanks
4 REPLIES 4

patil
Champ on-the-rise
Champ on-the-rise
Set system as run user and try.


Thanks,
Patil
Cignex Technologies
Bangalore

alex_lu
Champ in-the-making
Champ in-the-making
Hi Patil,

I don't quite understand what you mean. Could you explain further, please?

Thanks

patil
Champ on-the-rise
Champ on-the-rise
Hi,

AuthenticationUtil.setRunAsUserSystem();

Before calling removeSecondaryChildAssociation() method use the above line.
After performing the operation reset the actual user.
AuthenticationUtil.setRunAsUser("admin");

Thanks,
Patil
Cignex Technologies
Bangalore

alex_lu
Champ in-the-making
Champ in-the-making
Thx. it worked!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.