Anders Persson
Anders Persson

Reputation: 337

Update access rights in Gerrit

I have made changes to the project.config for All_Projects . When saving the results I click "Save for Review" (I am not allowed to save it directly). It works ok and I get a review in Gerrit where everything looks ok. I then set code review +2 but then I am not able to set Verified +1. When looking in the project.config file it looks like this:

[access "refs/meta/config"]
    exclusiveGroupPermissions = read
    read = group Administrators
    read = group Project Owners
    push = group Administrators
    push = group Project Owners
    label-Code-Review = -2..+2 group Administrators
    label-Code-Review = -2..+2 group Project Owners
    submit = group Administrators
    submit = group Project Owners

So the verifed possibility is missing. But since I can not submit my changes I can not change it to something like this

[access "refs/meta/config"]
    exclusiveGroupPermissions = read
    read = group Administrators
    read = group Project Owners
    push = group Administrators
    push = group Project Owners
    label-Code-Review = -2..+2 group Administrators
    label-Code-Review = -2..+2 group Project Owners
    submit = group Administrators
    submit = group Project Owners
    label-Verified = -1..+1 group Administrators

How can I work around this?

Upvotes: 1

Views: 1944

Answers (1)

love
love

Reputation: 1040

You need to manually add the change to have the Verified option. You may follow the below options:

mkdir tmp
cd tmp
git init
git remote add origin ssh://[email protected]:29418/All-Projects
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config

No you will be able to see project.config file. Keep the below block to that file:

[label "Verified"]
       value = -1 Fails
       value =  0 No score
       value = +1 Verified

Now commit and push this change to remote.

git commit -a
git push origin meta/config:meta/config

That's all, now you will be able to see the Verified option as well.

Upvotes: 1

Related Questions