Skip to content

fix retrieval of user groups - #13280

Merged
MorrisJobke merged 1 commit into
masterfrom
fix-12306
Jan 12, 2015
Merged

MorrisJobke merged 1 commit into
masterfrom
fix-12306

Conversation

@blizzz

@blizzz blizzz commented Jan 12, 2015

Copy link
Copy Markdown
Contributor

This fixes #12306.

We need to reset the paged search to work properly with a certain LDAP server when reading an attribute. However, the number of entries to be returned should not be one, as it bring problems here or there. We now use the Chunk Size therefore (defaults to 500) or 500 is the specified one is too small.

How to test?

  1. Have an LDAP user who is member of more than 2 groups.
  2. Run https://gist.github.com/blizzz/736339dc4938a920e087 and pass the users ownCloud username as first parameter and nonsense as second (not needed here). You will see that only one (LDAP!) group is returned.
  3. Apply this patch and do 2) again. Now all groups are listed.

Please test/review @MorrisJobke @tkaufm @oxivanisher @d-tamm @jnfrmarks

@MorrisJobke

Copy link
Copy Markdown
Contributor

@karlitschek Backport request. Do you approve this for stable7?

@blizzz blizzz added this to the 8.0-current milestone Jan 12, 2015
@blizzz

blizzz commented Jan 12, 2015

Copy link
Copy Markdown
Contributor Author

@karlitschek fixes an regression introduced to 7.0.3, so a backport permission is highly appreciated.

@karlitschek

Copy link
Copy Markdown
Contributor

👍

@karlitschek

Copy link
Copy Markdown
Contributor

backport please

@ghost

ghost commented Jan 12, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/6430/
👍 Test PASSed. 👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

Works and fixes the issue 👍

MorrisJobke added a commit that referenced this pull request Jan 12, 2015
fix retrieval of user groups
@MorrisJobke
MorrisJobke merged commit af4d60a into master Jan 12, 2015
@MorrisJobke
MorrisJobke deleted the fix-12306 branch January 12, 2015 16:42
@MorrisJobke

Copy link
Copy Markdown
Contributor

@blizzz Can you take care of the backport? It's just a problem with the comment of the "magic properties" but you know how to fix it ;)

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 1 updated code elements

@d-tamm

d-tamm commented Jan 13, 2015

Copy link
Copy Markdown

Works for me, thank you! However, if I do not pass nonsense as the second parameter to the script but an existing group name, still only one group is listed. But the owncloud user admin interface now lists all groups.
Looking forward to 7.0.5, finally I will be able to update again!

@blizzz

blizzz commented Jan 13, 2015

Copy link
Copy Markdown
Contributor Author

However, if I do not pass nonsense as the second parameter to the script but an existing group name, still only one group is listed.

@d-tamm sure? a passed group is solely used for the second part of the script, listing users in a group. It is also only used later in the script. Maybe you have had an old result in the cache?

@blizzz

blizzz commented Jan 13, 2015

Copy link
Copy Markdown
Contributor Author

backport to stable7: 713f2b3

@d-tamm

d-tamm commented Jan 13, 2015

Copy link
Copy Markdown

@blizzz Yes, you are right, must have been a cache problem. When I now repeat the command with an existing group name as 2nd parameter I get the right groups listed, too.

@blizzz

blizzz commented Jan 13, 2015

Copy link
Copy Markdown
Contributor Author

@d-tamm ok, thanks for re-validating! :)

@blizzz blizzz mentioned this pull request Jan 13, 2015
@tkaufm

tkaufm commented Jan 13, 2015

Copy link
Copy Markdown

@blizzz
works for me as well (on 704).
Thanks a lot.

Best Tobias

@blizzz

blizzz commented Jan 13, 2015

Copy link
Copy Markdown
Contributor Author

perfect, thanks for testing @tkaufm!

@oxivanisher

Copy link
Copy Markdown

I don't think this problem is solved. Our users sometimes are in all needed groups, and sometimes not. I ran the script you provided (without applying the patch since we have OC 8.0.2) twice and the first time the user was in one group and seconds later in two. Something still is not right.

@blizzz

blizzz commented Mar 20, 2015

Copy link
Copy Markdown
Contributor Author

@oxivanisher if it works at least sometimes, it is a new issue. Can you please open a new issue using the template https://raw.githubusercontent.com/owncloud/core/master/issue_template.md? Thank you!

@oxivanisher

Copy link
Copy Markdown

@blizzz #15065 is the new issue. Thanks for any help!

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LDAP groups not working correctly

8 participants