alfrescoalfresco-share

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


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

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.


Solution

  • I found that I have old addon on version 5.0 which extends PermissionServiceImpl. Back then there were some fixes about permissions. In new versions there are not more needed. My solution was simple: remove addon from 5.0, apply amps, make backup and after that restore on newer version.