Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User.GetMemberships returns 0 items #328

Open
emiliogq opened this issue Aug 26, 2019 · 1 comment
Open

User.GetMemberships returns 0 items #328

emiliogq opened this issue Aug 26, 2019 · 1 comment

Comments

@emiliogq
Copy link

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

@alexeyOnGitHub
Copy link
Member

I would suggest trying this on your own Redmine instance. please check that this is not a permissions problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants