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

Nested ldap groups #30223

Merged
merged 22 commits into from
Oct 20, 2022
Merged

Nested ldap groups #30223

merged 22 commits into from
Oct 20, 2022

Commits on Oct 20, 2022

  1. Make it possible to return nested records whem walking over groups

    Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
    blizzz authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    1e4ac22 View commit details
    Browse the repository at this point in the history
  2. Refactor code to split common loop

    Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
    blizzz authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    ad2fdbe View commit details
    Browse the repository at this point in the history
  3. Cache intermediates

    Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
    Co-authored-by: Carl Schwan <carl@carlschwan.eu>
    blizzz and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    5647093 View commit details
    Browse the repository at this point in the history
  4. Add more type hinting

    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    0fd7a51 View commit details
    Browse the repository at this point in the history
  5. Unify a bit the types of the fetcher

    Now it will only accept a string as parameter instead of either a string
    (DN) or a array (complete record).
    
    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    49aa352 View commit details
    Browse the repository at this point in the history
  6. Fix merging list with null

    This fixes some cases observed with the debugger where we end up merging
    a non empty list with null. The result is then null and the looping over
    the items would then end.
    
    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    6522f8a View commit details
    Browse the repository at this point in the history
  7. Refactor _groupMembers to correctly use cache on intermediate results

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    d07f43d View commit details
    Browse the repository at this point in the history
  8. Small optimisation of _groupMembers

    This will not change the result as users are check to be existing
     afterwards but avoids this check when we know it’s a group.
    
    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    8b19cfc View commit details
    Browse the repository at this point in the history
  9. Add tests for nested groups

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    02ccce1 View commit details
    Browse the repository at this point in the history
  10. Refactor group membership listing for nested groups

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    6ed0d0b View commit details
    Browse the repository at this point in the history
  11. Add testing of nested group membership

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    7437673 View commit details
    Browse the repository at this point in the history
  12. Fix types in docblocks

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    150e6ad View commit details
    Browse the repository at this point in the history
  13. Removed unused use declaration

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    69f9e9f View commit details
    Browse the repository at this point in the history
  14. Add missing copyright author in Group_LDAP

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    604b5ac View commit details
    Browse the repository at this point in the history
  15. Only cache base inGroup search

    And not intermediate search for nested groups, this is causing issues
    othewise with nested groups
    
    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    33be3f7 View commit details
    Browse the repository at this point in the history
  16. Add back runtime cache for intermediate ldap read results

    This is a small optimization that save a few LDAP queries
    
    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    e0fbd39 View commit details
    Browse the repository at this point in the history
  17. Fix user_ldap tests

    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    1b12a08 View commit details
    Browse the repository at this point in the history
  18. Revert Carl changes on apps/user_ldap/lib/Group_LDAP.php

    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    be5338e View commit details
    Browse the repository at this point in the history
  19. Fix LDAP recursive nested group support

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    746a5fb View commit details
    Browse the repository at this point in the history
  20. Bring back small fixes by Carl

    Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
    come-nc authored and CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    1a6a6c9 View commit details
    Browse the repository at this point in the history
  21. Check if cache is present with isset

    Otherwise we get false for empty array
    
    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    60ec5e6 View commit details
    Browse the repository at this point in the history
  22. Fix psalm

    Signed-off-by: Carl Schwan <carl@carlschwan.eu>
    CarlSchwan committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    99a7529 View commit details
    Browse the repository at this point in the history