Closed vbris closed 6 years ago
UserManager has a method to load users:
*** * <p><strong>This operation requires "Redmine Administrator" permission.</strong>***
...
public List<User> getUsers() throws RedmineException {
return transport.getObjectsList(User.class, new BasicNameValuePair(
"include", "memberships,groups"));
}
it should load groups and memberships automatically. are you using Admin account to load users?
also, if you are using a different "getUsers" method, you need to provide this "include" param manually.
Hello, I have a problem with retrieving groups from user object. When I do:
for (User user : users) { Collection<Group> groups = user.getGroups(); System.out.println(user.getLogin() +","+ groups.isEmpty()); }
And I get:user1,true user2,true ...
I'm not sure if I call the method correctly. Could you give me an advice please? Thank you very much!