[MAGNOLIA-1256] MgnlGroupManager, MgnlRoleManager, MgnlUserManager fail to create groups, roles, and users respectively via their associated create... methods. Created: 06/Dec/06 Updated: 23/Jan/13 Resolved: 07/Dec/06 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 3.0 Final |
| Fix Version/s: | 3.0.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Miner | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
the group and role managers try to create content rather than groups or roles. All the classes call the save method on the newly created node, which fails due to the apparent fact that it isn't allowed to call save on a newly created node. See attached patch and stack. |
| Comments |
| Comment by Magnolia International [ 07/Dec/06 ] |
|
Chris, is it on purpose that you use getHierarchyManager().save() instead of node.save() ? I don't see a reason for this. |
| Comment by Capitaine Harold [ 07/Dec/06 ] |
|
Hi Gregory, I haven't worked on these patchs, but I often work with hierarchymanager. What I say is maybe wrong, but it's the only way for me to save a new node in a workspace. Hope to be helpful. Regards. |
| Comment by Magnolia International [ 07/Dec/06 ] |
|
haa, true. Thanks ! |
| Comment by Magnolia International [ 07/Dec/06 ] |
|
Patch applied, thanks ! |
| Comment by Chris Miner [ 07/Dec/06 ] |
|
The other option is to call save on the new nodes parent. Which in the case of users, groups, and roles is the root node, which means all the nodes in the workspace. At which point I thought both approaches were basically the same and went with the one that would leave the least doubt as to what would happen. |
| Comment by Magnolia International [ 07/Dec/06 ] |
|
perfect - thanks again |