cancel
Showing results for 
Search instead for 
Did you mean: 

3.3.x: space templates ignore space users/groups

heiko_robert
Star Collaborator
Star Collaborator
a functionality we allready used successfull in 2.x versions seems to be lost:

alfresco 3.3.x (E+CE) ignores invited groups or space users set in the space template when creating a new space from that space template.

how to reproduce:
  • create group TestgroupA

  • go to Company Home > Data Dictionary> Space Templates > Software Engineering Project > Quality Assurance

  • Manage Space Users and invite Group TestgroupA as Coordinator in that space

  • navigate to a space outside Data Dictionary and create new Space using "Advanced Space Wizard" based on the space template "Software Engineering Project"
result: space structure is created but subspace "Quality Assurance" has no space users added
expected behavior: subspace "Quality Assurance" has invited group TestgroupA as Coordinator

same lack of function using java with deepCopy / script ScriptNode copy(ScriptNode destination, boolean deepCopy)

Is this a bug or a known restriction in 3.x versions?
Before writing just another work around I would welcome any feedback.

Thanks
Heiko
2 REPLIES 2

adelllka
Champ in-the-making
Champ in-the-making
Hello,

I'm facing the same problem, Alfresco 3.4.c

Anyone found solution?

adelllka
Champ in-the-making
Champ in-the-making
No one, obviously. This bug is already reported as http://issues.alfresco.com/jira/browse/ALF-2638 and also fixed for the enterprise version

Maybe it'll be fixed better way but my solution is:


CopyServiceImpl.java

[207]  public NodeRef copy(…..



[255] copyAcl(copiesByOriginals);



   
    private void copyAcl(Map<NodeRef, NodeRef> copiedNodes) {
        for (Entry<NodeRef, NodeRef> e : copiedNodes.entrySet()) {
            final NodeRef src = e.getKey();
            final NodeRef copy = e.getValue();

            permissionService.setInheritParentPermissions(copy, permissionService.getInheritParentPermissions(src));

            final Set<AccessPermission> perms = permissionService.getAllSetPermissions(src);
            for (AccessPermission a : perms) {
                permissionService.setPermission(copy, a.getAuthority(), a.getPermission(), true);
            }
        }
    }


Don't forget to define PermissionService property and configure the dependency injection for it.