[MAGNOLIA-4770] Allow creation of users under certain path Created: 11/Jan/13  Updated: 09/May/13  Resolved: 22/Jan/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.10, 4.5.8, 5.0

Type: Task Priority: Neutral
Reporter: Jaroslav Simak Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-4767 Merge HierarchicalUsersTreeHandler wi... Closed
is related to DOCU-417 Security: same names under different ... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

Right now when we create user via MgnlUserManager, user is always created under its realm node. If we want to create users under folders we need to add this option to UserManager.



 Comments   
Comment by Jaroslav Simak [ 14/Jan/13 ]

I accidentally commited code which belongs to MAGNOLIA-4758 in this fix. Code which should be in the other ticket is down below.

                final String[] aclNames = new String[] { "acl_website", "acl_dms", "acl_data" };

                for (String aclName : aclNames) {
                    Node userAcl = userNode.addNode(aclName, MgnlNodeType.NT_CONTENTNODE);
                    acl = userAcl.addNode("0", MgnlNodeType.NT_CONTENTNODE);
                    acl.setProperty("permissions", Permission.READ);
                    acl.setProperty("path", "/jcr:system");
                    acl = userAcl.addNode("00", MgnlNodeType.NT_CONTENTNODE);
                    acl.setProperty("permissions", Permission.READ);
                    acl.setProperty("path", "/jcr:system/*");
                }
Generated at Mon Feb 12 03:58:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.