Skip to content

User.GetMemberships returns 0 items #328

Open
@emiliogq

Description

@emiliogq

Hi,

I am using GetCurrentUser() method to obtain the current and logged user. But when I tried to get all memberships I realized it did not return any item at all.

An used user example is attached. Some fields were removed for security reasons.

The following code shows the issue:

RedmineManager mgr = RedmineManagerFactory.createWithUserAuth(this.URI, username, password);
UserManager umgr = mgr.getUserManager();
                try {
			User u = umgr.getCurrentUser().
                        Collection<Membership> mc = u.getMemberships();
                        System.out.println(mc.size()); // Prints 0
		} catch (RedmineException e) {
			throw new AuthenticationException(e);
		}

I've tested this code using several URIs such as http://www.hostedredmine.com/

Thanks in advance

current_modified.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions