Remove project level access using Gerrit CLI

36 views
Skip to first unread message

Mohan Sai Teki

unread,
Jul 14, 2021, 5:11:02 AM7/14/21
to Repo and Gerrit Discussion
Hi Community,

Scenario:
We are trying to remove the non-active users from our Gerrit server. We don't want to delete the user from our Gerrit. We just wanted to remove the user from our Gerrit groups and project/branch level access if any.

For this, we are preferring Gerrit CLI to automate this process. We are able to remove the user from groups using CLI but we couldn’t find any article or documentation to remove the user from project/branch level access using CLI. 

I found the below article, where we can achieve this by using REST API:

I would like to know, does Gerrit CLI supports removing the user from branch/project level access?

Edwin Kempin

unread,
Jul 14, 2021, 5:13:03 AM7/14/21
to Mohan Sai Teki, Repo and Gerrit Discussion
Gerrit ACLs are assigned to groups, not users.
This means if you remove the users from the groups, their access rights should already be revoked.
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/037a408d-aad7-4a2d-985e-0aa2153b3981n%40googlegroups.com.

Mohan Sai Teki

unread,
Jul 14, 2021, 5:44:50 AM7/14/21
to Edwin Kempin, Repo and Gerrit Discussion
Hi Edwin,

There are no issues with access rights. We are deleting the user from our Google Workspace. We want to clean up data in our Gerrit server.

As part of removing the user from groups. We are not removing the users from Anonymous Users,  Registered Users, user/ groups.

We want to remove the user from refs/heads/* or refs/for/refs/heads/* if the user has access, through Gerrit CLI.

Thanks,
Mohan Sai Teki | DevOps Engineer | Mobile: 9949094562

Martin Fick

unread,
Aug 11, 2021, 1:42:34 PM8/11/21
to repo-d...@googlegroups.com, Mohan Sai Teki, Edwin Kempin
On Wednesday, July 14, 2021 3:14:33 PM MDT Mohan Sai Teki wrote:
> There are no issues with access rights. We are deleting the user from our
> Google Workspace. We want to clean up data in our Gerrit server.
>
> As part of removing the user from groups. We are not removing the users
> from *Anonymous Users, * *Registered Users,* *user/ *groups.
>
> We want to remove the user from refs/heads/* or refs/for/refs/heads/* if
> the user has access, through Gerrit CLI.

If you are granting access to *Anonymous Users* or *Registered Users*, then
to make those users not have access you likely need to add a DENY rule for a
group they are in,

-Martin
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

Martin Fick

unread,
Aug 11, 2021, 1:56:18 PM8/11/21
to repo-d...@googlegroups.com, Mohan Sai Teki, Edwin Kempin
On Wednesday, August 11, 2021 11:41:56 AM MDT Martin Fick wrote:
> On Wednesday, July 14, 2021 3:14:33 PM MDT Mohan Sai Teki wrote:
> > There are no issues with access rights. We are deleting the user from our
> > Google Workspace. We want to clean up data in our Gerrit server.
> >
> > As part of removing the user from groups. We are not removing the users
> > from *Anonymous Users, * *Registered Users,* *user/ *groups.
> >
> > We want to remove the user from refs/heads/* or refs/for/refs/heads/* if
> > the user has access, through Gerrit CLI.
>
> If you are granting access to *Anonymous Users* or *Registered Users*, then
> to make those users not have access you likely need to add a DENY rule for
> a group they are in,

You may also want to consider making the Gerrit accounts inactive,
Reply all
Reply to author
Forward
0 new messages