-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Allow ldap_dynamic_group_member_url to be a filter #8230
Conversation
This change allows dynamic_group_member_url of the user_ldap module to be the filter itself instead of an attribute where the filter can be read from. The value is assumed to be a filter when it starts with a round bracket. The substring '%gid' will be replaced by the group's DN. This allows group members to be resolved by LDAP_MATCHING_RULE_IN_CHAIN on Active Directory servers. Example: (&(objectClass=person)(memberOf:1.2.840.113556.1.4.1941:=%gid)) Returns all persons that are either direct members of %gid or members of another group that is member of %gid. Signed-off-by: Roland Tapken <[email protected]>
Why has the jsunit test being aborted?! However, since this patch did not change the UI it shouldn't matter. |
fetchListOfGroups() returns an array of strings when called with a single attribute to fetch. This patch makes the result compatible with the rest of the method. Signed-off-by: Roland Tapken <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #8230 +/- ##
============================================
+ Coverage 51.73% 51.79% +0.06%
- Complexity 25366 25371 +5
============================================
Files 1599 1607 +8
Lines 95064 95160 +96
Branches 1376 1378 +2
============================================
+ Hits 49180 49290 +110
+ Misses 45884 45870 -14
|
@nextcloud/ldap Please have a look at this as well. |
Please don't use Would it be feasable to write some unit tests for it? |
Signed-off-by: Roland Tapken <[email protected]>
@blizzz I've replaced the string. Is there any tutorial on how to setup a test environment where I can execute the unit tests myself before pushing them into the repository? |
@Cybso does this help? https://docs.nextcloud.com/server/13/developer_manual/core/unit-testing.html
|
@blizzz Thanks, I will try |
@Cybso seems you did not have a chance yet, did you? |
@blizzz Yes, you're right, I'm very busy at the moment, but I haven't forgot this ticket. Holidays are coming in a few weeks and I think I will then find the time to write this test case. |
@Cybso any updates? This is conflicting with other changes of that file that happened in the meantime. |
I am very sorry, but at the moment I am extremely busy both professionally and privately, so I did not have the time to do that and probably will not find an opportunity to get into the test framework in the foreseeable future. But since we still have to do the upgrade to Nextcloud 15 within my company I think I will at least be able to solve the merge conflicts this week. |
I'm going to close this. |
This change allows dynamic_group_member_url of the user_ldap module to
be the filter itself instead of an attribute where the filter can
be read from. The value is assumed to be a filter when it starts with
a round bracket. The substring '%gid' will be replaced by the group's
DN.
This allows group members to be resolved by LDAP_MATCHING_RULE_IN_CHAIN
on Active Directory servers. Example:
Returns all persons that are either direct members of %gid or members
of another group that is member of %gid.
An alternative implementation would be to implement this as a dedicated settings field, but this "simple" solution works for me ;-)
Signed-off-by: Roland Tapken [email protected]