[MAGNOLIA-2496] getAllUsers method from MgnlUserManager not working Created: 05/Dec/08 Updated: 11/Aug/11 Resolved: 11/Aug/11 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | security |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Alvaro Arce | Assignee: | Unassigned |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | usermanager | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows XP, java 1.5, JBoss 4.0.4 |
||
| Issue Links: |
|
||||||||||||
| 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 method getAllUsers method from MgnlUserManager in the package info.magnolia.cms.security because of the new structure of the users repository. The method could be changed as shown behind in order to work : getAllUsers /**
* All users
*/
public Collection getAllUsers() {
Collection users = new ArrayList();
try {
Collection nodes = getHierarchyManager().getContent("/admin").getChildren(ItemType.USER);
Collection nodes2= getHierarchyManager().getContent("/system").getChildren(ItemType.USER);
//we always have a superuser so nodes2 can't be null right?
//and because some collections refuse to add null elements
if (nodes !=null)
nodes2.addAll(nodes);
for (Iterator iter = nodes2.iterator(); iter.hasNext();) {
users.add(new MgnlUser((Content) iter.next()));
}
}
catch (Exception e) {
log.error("can't find user");
}
return users;
}
|
| Comments |
| Comment by Philipp Bracher [ 05/Dec/08 ] |
|
The getAllUsers method should only return the users from the particular realm. So the bugfix should base on the getFromRepository(String) method. Be aware of the fact that you can have more subfolders! |
| Comment by Magnolia International [ 05/Dec/08 ] |
|
This is a known issue: |
| Comment by Philipp Bärfuss [ 17/Feb/11 ] |
|
Increased the priority and scheduled it for 4.4.3. |
| Comment by Ondrej Chytil [ 11/Aug/11 ] |
|
Fixed with |