Re: First gerrit account doesn't have admin privilege(PostgreSQL 8.4+gerrit 2.4.2+LDAP)

1,678 views
Skip to first unread message

Magnus Bäck

unread,
Aug 15, 2012, 10:09:44 AM8/15/12
to repo-d...@googlegroups.com
On Wednesday, August 15, 2012 at 07:51 EDT,
Zhihai Wang <page...@gmail.com> wrote:

> After installing postgresql and gerrit successfully, I created the
> first gerrit user with "ldapadd -x -D cn=admin,dc=longcheer,dc=net -E
> -f shenjun.ldif"
> But when I login with this account, I found I'm not in the
> Administrator group.

Is this actually the account you're logging in as, i.e. is the account
id listed udner Settings -> Profile equal to 1000000?

> I logged into database and add this user into account_group_members
> and restart gerrit, now the user is in Administrator group, but don't
> have administrator permission, such as create new group, etc.
>
> From following, can see the user is successfully added into
> Administrator group, can anyone tell me why and how to address
> this issue?
> *gerrit> select * from account_group_members;*
> * account_id | group_id*
> * -----------+---------*
> * 1000000 | 1*

Unless this has changed recently, group membership changes are only
picked up when logging in. Hence, if you were logged in with that
account when you modified the database you need to sign out and login
again. You can verify in Settings -> Groups which groups Gerrit thinks
you are a member of.

--
Magnus Bäck
ba...@google.com

Zhihai Wang

unread,
Aug 15, 2012, 8:57:10 PM8/15/12
to repo-d...@googlegroups.com
Hi  Magnus Bäck,

For your first question, yes it's the account I logged in, the account id is 1000000, and this is the first and the only account in gerrit.
For your second question, I restarted gerrit and re-logged in, I can see the account is in Administrator group, but I can't see the "New Group" button, this is  werid!

在 2012年8月15日星期三UTC+8下午10时09分44秒,Magnus Bäck写道:
在 2012年8月15日星期三UTC+8下午10时09分44秒,Magnus Bäck写道:
在 2012年8月15日星期三UTC+8下午10时09分44秒,Magnus Bäck写道:

Zhihai Wang

unread,
Aug 16, 2012, 8:51:46 PM8/16/12
to repo-d...@googlegroups.com
Fixed by reinstall ubuntu, and everything

在 2012年8月16日星期四UTC+8上午8时57分10秒,Zhihai Wang写道:

Magnus Bäck

unread,
Feb 1, 2013, 1:41:36 PM2/1/13
to repo-d...@googlegroups.com
On Friday, February 01, 2013 at 12:43 EST,
Laurent Ghirardotti <lol...@gmail.com> wrote:

> I'm having exactly the same problem :/
>
> My admin account is listed in the admin group, can create a project,
> but can't verify.

Does your account actually have Label-Verified permissions? I don't
think anyone has by default, not even admins.

[...]

--
Magnus Bäck
ba...@google.com

Matthias Sohn

unread,
Feb 2, 2013, 5:47:46 PM2/2/13
to Laurent Ghirardotti, Repo and Gerrit Discussion
2013/2/2 Laurent Ghirardotti <lol...@gmail.com>
I feel stupid, I've read the access control page but can't get how to give a user this right.
Do I need to create the purposed roles ? And if so, how can I do it ?

- visit your project's access control page, e.g. for project foo/bar:
- click "Edit"
- under Reference refs/heads/* click "Add permission", select "Label Verified"
- click "Add Group" and select the group which should gain permission to vote on this category
- also select the range of values this group should be able to vote (for verified this is usually -1..1)
- click "Save changes"

--
Matthias
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages