0
votes

I have manged installing Gerrit and configuring it to use LDAP while authenticating GUI. I also manged using the LDAP accounts while pushing new code to Gerrit. Right now I the following issues:

1) I can't search for LDAP users or groups while adding reviewers.

2) I can't add a reviewer from LDAP users or groups.

3) LDAP group don't have the ability to give +2 on code review.

4) LDAP group don't have the ability submit.

5) 1+1 doesn't lead to +2 if the +1s are granted by LDAP users.

Here are my Gerrit configs:

[auth]
          type = LDAP
          gitBasicAuth = true
[ldap]
          server = ldap://IP:Port
          username = username
          password = password
          accountBase = accountBase
          groupBase = groupBase
          referral = follow
          accountPattern = (sAMAccountName=${username})
          groupPattern = (cn=${groupname})
          accountFullName = displayName
          accountMemberField = member
          accountEmailAddress = mail
          groupMemberPattern = (&(objectClass=groupOfNames)(member=${groupname}))

Here are the project configuration:

[access "refs/for/refs/*"]
          push = group ldap/Group Name
          submit = group ldap/Group Name
          owner = group ldap/Group Name
          pushMerge = group ldap/Group Name
[access "refs/heads/*"]
          label-Code-Review = -2..+2 group ldap/Group Name
          submit = group ldap/Group Name
          push = group ldap/Group Name
          owner = group ldap/Group Name
          forgeAuthor = group ldap/Group Name
1

1 Answers

0
votes
  1. The LDAP users needs to login to Gerrit Server first, then Gerrit will create user database at Gerrit server. After that, you could search LDAP users at Gerrit server.

  2. You have to set project access ability to have Submit and Label Code-Review +2 for the LDAP users. In gerrit, there is a default group calls Registered Users, it means that all the login user belongs to Registered Users. You could set Registered Users to have Submit and Label Code-Review +2 at project access ability setting.

  3. At Gerrit, 1+1 does not means +2, only the +2 users means +2. For example, if 1+1+1 users code-review validated, you cannot submit still. You still needs a +2 users for code-review validated.