Tuleap Community Edition development and releases are no longer public. You have until September 30th to download packages and sources in Tuleap project. You can contact the team if you need further assistance.

    •  
      request #8918 LDAP directory bindings to a user group are kept after the ugroup removal
    Infos
    #8918
    Thomas Gerbet (tgerbet)
    2016-03-10 13:47
    2016-03-01 15:55
    9030
    Details
    LDAP directory bindings to a user group are kept after the ugroup removal
    When a user group is removed LDAP directory bindings are not removed as well. After you have removed a user group and try to synchronize user groups with LDAP, you get the following stack trace from the codendi daily job due to database inconsistencies:
    PHP Catchable fatal error: Argument 2 passed to Git_Driver_Gerrit_MembershipManager::addUserToGroup() must be an instance of ProjectUGroup, null given, called in /usr/share/tuleap/plugins/git/include/gitPlugin.class.php on line 1047 and defined in /usr/share/tuleap/plugins/git/include/Git/Driver/Gerrit/MembershipManager.class.php on line 69
    PHP Stack trace:
    PHP 1. {main}() /usr/share/tuleap/src/utils/codendi_daily.php:0
    PHP 2. EventManager->processEvent() /usr/share/tuleap/src/utils/codendi_daily.php:35
    PHP 3. EventManager->processEventOnListener() /usr/share/tuleap/src/common/event/EventManager.class.php:77
    PHP 4. PluginProxy->processEvent() /usr/share/tuleap/src/common/event/EventManager.class.php:91
    PHP 5. LdapPlugin->codendi_daily_start() /usr/share/tuleap/src/common/plugin/PluginProxy.php:57
    PHP 6. LDAP_UserGroupManager->synchronizeUgroups() /usr/share/tuleap/plugins/ldap/include/ldapPlugin.class.php:872
    PHP 7. LDAP_GroupManager->bindWithLdap() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupManager.class.php:152
    PHP 8. LDAP_GroupManager->syncMembersWithLdap() /usr/share/tuleap/plugins/ldap/include/LDAP_GroupManager.class.php:144
    PHP 9. LDAP_UserGroupManager->addUserToGroup() /usr/share/tuleap/plugins/ldap/include/LDAP_GroupManager.class.php:165
    PHP 10. LDAP_UserGroupDao->addUserToGroup() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupManager.class.php:59
    PHP 11. ugroup_add_user_to_ugroup() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupDao.class.php:107
    PHP 12. EventManager->processEvent() /usr/share/tuleap/src/www/project/admin/ugroup_utils.php:610
    PHP 13. EventManager->processEventOnListener() /usr/share/tuleap/src/common/event/EventManager.class.php:77
    PHP 14. PluginProxy->processEvent() /usr/share/tuleap/src/common/event/EventManager.class.php:91
    PHP 15. GitPlugin->project_admin_ugroup_add_user() /usr/share/tuleap/src/common/plugin/PluginProxy.php:57
    PHP 16. Git_Driver_Gerrit_MembershipManager->addUserToGroup() /usr/share/tuleap/plugins/git/include/gitPlugin.class.php:1047

    Catchable fatal error: Argument 2 passed to Git_Driver_Gerrit_MembershipManager::addUserToGroup() must be an instance of ProjectUGroup, null given, called in /usr/share/tuleap/plugins/git/include/gitPlugin.class.php on line 1047 and defined in /usr/share/tuleap/plugins/git/include/Git/Driver/Gerrit/MembershipManager.class.php on line 69

    Call Stack:
    0.0001 640360 1. {main}() /usr/share/tuleap/src/utils/codendi_daily.php:0
    0.0720 15798936 2. EventManager->processEvent() /usr/share/tuleap/src/utils/codendi_daily.php:35
    0.1611 33046640 3. EventManager->processEventOnListener() /usr/share/tuleap/src/common/event/EventManager.class.php:77
    0.1611 33046640 4. PluginProxy->processEvent() /usr/share/tuleap/src/common/event/EventManager.class.php:91
    0.1611 33049104 5. LdapPlugin->codendi_daily_start() /usr/share/tuleap/src/common/plugin/PluginProxy.php:57
    0.1736 35578352 6. LDAP_UserGroupManager->synchronizeUgroups() /usr/share/tuleap/plugins/ldap/include/ldapPlugin.class.php:872
    0.2306 35596864 7. LDAP_GroupManager->bindWithLdap() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupManager.class.php:152
    0.2477 35596864 8. LDAP_GroupManager->syncMembersWithLdap() /usr/share/tuleap/plugins/ldap/include/LDAP_GroupManager.class.php:144
    0.2491 35597928 9. LDAP_UserGroupManager->addUserToGroup() /usr/share/tuleap/plugins/ldap/include/LDAP_GroupManager.class.php:165
    0.2491 35598672 10. LDAP_UserGroupDao->addUserToGroup() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupManager.class.php:59
    0.2493 35598768 11. ugroup_add_user_to_ugroup() /usr/share/tuleap/plugins/ldap/include/LDAP_UserGroupDao.class.php:107
    0.2664 35600384 12. EventManager->processEvent() /usr/share/tuleap/src/www/project/admin/ugroup_utils.php:610
    0.2765 35675768 13. EventManager->processEventOnListener() /usr/share/tuleap/src/common/event/EventManager.class.php:77
    0.2765 35675768 14. PluginProxy->processEvent() /usr/share/tuleap/src/common/event/EventManager.class.php:91
    0.2770 35740480 15. GitPlugin->project_admin_ugroup_add_user() /usr/share/tuleap/src/common/plugin/PluginProxy.php:57
    0.2823 37272424 16. Git_Driver_Gerrit_MembershipManager->addUserToGroup() /usr/share/tuleap/plugins/git/include/gitPlugin.class.php:1047

    Steps to reproduce:
    1. Create a user group
    2. Link this user group to a LDAP directory
    3. Remove the user group
    4. You can check in the database that in the table plugin_ldap_ugroup the user group is still present.
    Authentication & LDAP
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2016-03-10
    Attachments
    Empty
    References
    Referencing request #8918
    Referenced by request #8918

    Follow-ups

    User avatar

    Merged in Tuleap 8.12.99.21


    • Status changed from Under review to Closed
    • Close date set to 2016-03-10
    User avatar
    Thomas Gerbet (tgerbet)2016-03-02 17:47

    A patch is under review: gerrit #5184.


    • Summary
      -LDAP directory bindings to a user group are kept after the user removal 
      +LDAP directory bindings to a user group are kept after the ugroup removal 
    • Status changed from Under implementation to Under review