•  
      request #7915 Flag gerrit user account as inactive when they are suspended from ldap
    Infos
    #7915
    BEN MANSOUR Med Rafik (benm)
    2015-07-22 11:55
    2015-03-06 17:03
    7928
    Details
    Flag gerrit user account as inactive when they are suspended from ldap
    Suspended users accounts (from tuleap) :
    - cannot be accessible from gerrit
    - cannot be assigned as reviewers
    Authentication & LDAP
    Empty
    CentOS 6
    • [x] enhancement
    • [ ] internal improvement
    Empty
    Stage
    BEN MANSOUR Med Rafik (benm)
    Closed
    2015-07-22
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Integrated in 8.4.99.10, thanks for your contribution

    • Status changed from Under review to Closed
    • Close date set to 2015-07-22
    User avatar
    Hello Manuel,

    The build failed many times i though the problem was from my commit but in the end the solution was making a rebase.
    it's clean now.

    regards,
    Rafik
    User avatar
    Rafik,

    I don't understand what's going on with your patch.
    It seems you have trouble to have sth in a clean shape, could you detail ?
    User avatar
    You didn't mention that your issue was in the tests.

    You should have a "plugins/ldap/tests/boostrap.php" that includes constants.php and your test file should include this file as well
    User avatar
    last edited by: BEN MANSOUR Med Rafik (benm) 2015-07-09 12:04
    Hello,

    I made the same changes as you mentionned but it seems that the ldap constants file is not included when the plugin is enabled, so it won't access the condition you made below.

    Is there something missing, or something that i didn't get ?
    User avatar
    Hello,

    The recommended way to deal with this situation ATM is to:
    - Create a constant in the source plugin for the event you want to listen to. In our case, LDAP_DAILY_SYNCHRO_UPDATE_USER.
    - In the listenting plugin, you should have a condition like "if (defined('LDAP_DAILY_SYNCHRO_UPDATE_USER')) { addHook }" to only listen to this hook if it exist

    And that's pretty much it.
    User avatar
    Hello Manuel,
    I tried to create a constants file to add my hook constant, but i can't find a proper way to include it without making a dependency between the plugins.
    Can you please assist me in this task ?

    • Reported in version cleared values: 7.10