Cannot change perrmission in Alfresco 7.4 after restore data from previos version

cancel
Showing results for 
Search instead for 
Did you mean: 
Dagoo
Active Member

Cannot change perrmission in Alfresco 7.4 after restore data from previos version

Jump to solution

I'm working on upgrade Alfresco 5.0 to 7.4. As documentation said i need make first upgrade to 5.2 and then to 7.4. I successfully migrate project with all dependencies to SDK 4.6 and run it in Alfresco 7.4. Now i tried migrade Alfresco data.

I restore backup from 5.0 in 5.2 and seems that everything is working. So i did backup in 5.2 and tried restore in 7.4. Alfresco start normally, everything working again but all crash when i tried edit permission. Manually via Share or via Java action i get same error:

Cannot invoke "org.alfresco.util.PolicyIgnoreUtil.ignorePolicy(org.alfresco.service.cmr.repository.NodeRef)" because "this.policyIgnoreUtil" is null

permission_error.png

For me it is very strange because this error comes from depth of Alfresco, see code on github. Files can be upload or created, error comes only when is attempt to change them. I do everything as admin. I tried permissionService via java action but it crashing only on changing methods. Get methods like this works:

permissionService.getInheritParentPermissions(actionedUponNodeRef);
permissionService.getAllSetPermissions(actionedUponNodeRef);

but change methods like this crash:

permissionService.setInheritParentPermissions(actionedUponNodeRef, false);

Have someone seen something like this before? Any ideas for more debugging will be good too.

1 Solution

Accepted Solutions
Dagoo
Active Member

Re: Cannot change perrmission in Alfresco 7.4 after restore data from previos version

Jump to solution

Yes, problem was in old addon on 5.0 which extends PermissionServiceImpl. Back then there were some fixes about permissions. My solution was simple. Remove addon from 5.0, apply amps, make backup and after that restore.

View solution in original post

3 Replies
4535992
Senior Member

Re: Cannot change perrmission in Alfresco 7.4 after restore data from previos version

Jump to solution

It shouldn't happened, it's seem you can't retrieve the "policyIgnoreUtil" bean reference form teh "policy-context.xml" file.

Try to put the bean "policyIgnoreUtil" in a context file made by you:

    <bean id="policyIgnoreUtil" class="org.alfresco.util.PolicyIgnoreUtil">
      <property name="tenantService" ref="tenantService"/>
      <property name="storesToIgnorePolicies" ref="storesToIgnorePolicies"/>
    </bean>
Dagoo
Active Member

Re: Cannot change perrmission in Alfresco 7.4 after restore data from previos version

Jump to solution

Now I found that i had one addon on 5.0 that extends PermissionServiceImpl. That must be source of that problem.

Dagoo
Active Member

Re: Cannot change perrmission in Alfresco 7.4 after restore data from previos version

Jump to solution

Yes, problem was in old addon on 5.0 which extends PermissionServiceImpl. Back then there were some fixes about permissions. My solution was simple. Remove addon from 5.0, apply amps, make backup and after that restore.