blob: ff252f74b797e9cffac665b8ece5ad29bc8552ec [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Access Controls
Shawn O. Pearce4b122b82009-02-18 18:22:14 -08002
3Access controls in Gerrit are group based. Every user account is a
4member of one or more groups, and access and privileges are granted
Matt Fischer620255a2011-03-22 14:28:23 -05005to those groups. Access rights cannot be granted to individual
6users.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -08007
8
Edwin Kempin4bf01962014-04-16 16:47:10 +02009[[system_groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080010== System Groups
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080011
Anita Kuno178f64b2014-04-22 18:52:28 -040012Gerrit comes with the following system groups:
Khai Do4245e6f2013-10-11 18:14:31 +020013
Khai Do4245e6f2013-10-11 18:14:31 +020014* Anonymous Users
15* Change Owner
Khai Do4245e6f2013-10-11 18:14:31 +020016* Project Owners
17* Registered Users
18
19The system groups are assigned special access and membership management
Jonathan Nieder2b2d62b2014-05-07 19:40:58 -070020privileges.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080021
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +020022
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010023[[anonymous_users]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080024=== Anonymous Users
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080025
26All users are automatically a member of this group. Users who are
27not signed in are a member of only this group, and no others.
28
29Any access rights assigned to this group are inherited by all users.
30
31Administrators and project owners can grant access rights to this
32group in order to permit anonymous users to view project changes,
33without requiring sign in first. Currently it is only worthwhile
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +010034to grant `Read` access to this group as Gerrit requires an account
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080035identity for all other operations.
36
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +020037
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010038[[project_owners]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080039=== Project Owners
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010040
41Access rights assigned to this group are always evaluated within the
42context of a project to which the access rights apply. These rights
43therefore apply to all the users who are owners of this project.
44
45By assigning access rights to this group on a parent project Gerrit
46administrators can define a set of default access rights for
Fredrik Luthanderea13ca52011-12-29 11:36:48 +010047<<category_owner,project owners>>. Child projects inherit these
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010048access rights where they are resolved to the users that own the child
49project. Having default access rights for
Fredrik Luthanderea13ca52011-12-29 11:36:48 +010050<<category_owner,project owners>> assigned on a parent project may
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010051avoid the need to initially configure access rights for
52newly created child projects.
53
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +020054
Khai Do4245e6f2013-10-11 18:14:31 +020055[[change_owner]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080056=== Change Owner
Khai Do4245e6f2013-10-11 18:14:31 +020057
58Access rights assigned to this group are always evaluated within the
59context of a change to which the access rights apply. These rights
60therefore apply to the user who is the owner of this change.
61
62It is typical to assign a label to this group, allowing the change
63owner to vote on his change, but not actually cause it to become
64approved or rejected.
65
Fredrik Luthander8fa3d262011-11-07 17:04:01 +010066[[registered_users]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080067=== Registered Users
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080068
69All signed-in users are automatically a member of this group (and
Fredrik Luthander54abc352012-01-20 16:18:41 +010070also <<anonymous_users,'Anonymous Users'>>, see above).
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080071
72Any access rights assigned to this group are inherited by all
73users as soon as they sign-in to Gerrit. If OpenID authentication
74is being employed, moving from only 'Anonymous Users' into this
75group is very easy. Caution should be taken when assigning any
76permissions to this group.
77
Dave Borowitz01c1b1f2013-02-27 13:49:04 -080078It is typical to assign `Code-Review -1..+1` to this group,
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080079allowing signed-in users to vote on a change, but not actually
80cause it to become approved or rejected.
81
82Registered users are always permitted to make and publish comments
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +010083on any change in any project they have `Read` access to.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -080084
85
Jonathan Nieder2b2d62b2014-05-07 19:40:58 -070086== Predefined Groups
87
88Predefined groups differs from system groups by the fact that they
89exist in the ACCOUNT_GROUPS table (like normal groups) but predefined groups
90are created on Gerrit site initialization and unique UUIDs are assigned
91to those groups. These UUIDs are different on different Gerrit sites.
92
93Gerrit comes with two predefined groups:
94
95* Administrators
96* Non-Interactive Users
97
98
99[[administrators]]
100=== Administrators
101
102This is the Gerrit "root" identity. The capability
103link:access-control.html#capability_administrateServer['Administrate Server']
104is assigned to this predefined group on Gerrit site creation.
105
106Users in the 'Administrators' group can perform any action under
107the Admin menu, to any group or project, without further validation
108or any other access controls. In most installations only those
109users who have direct filesystem and database access would be
110placed into this group.
111
112Membership in the 'Administrators' group does not imply any other
113access rights. Administrators do not automatically get code review
114approval or submit rights in projects. This is a feature designed
115to permit administrative users to otherwise access Gerrit as any
116other normal user would, without needing two different accounts.
117
118
119[[non-interactive_users]]
120=== Non-Interactive Users
121
122This is the Gerrit "batch" identity. The capabilities
123link:access-control.html#capability_priority['Priority BATCH'] and
124link:access-control.html#capability_streamEvents['Stream Events']
125are assigned to this predefined group on Gerrit site creation.
126
127The members of this group are not expected to perform interactive
128operations on the Gerrit web front-end.
129
130However, sometimes such a user may need a separate thread pool in
131order to prevent it from grabbing threads from the interactive users.
132
133These users live in a second thread pool, which separates operations
134made by the non-interactive users from the ones made by the interactive
135users. This ensures that the interactive users can keep working when
136resources are tight.
137
138
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800139== Account Groups
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800140
141Account groups contain a list of zero or more user account members,
142added individually by a group owner. Any user account listed as
143a group member is given any access rights granted to the group.
144
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800145Every group has one other group designated as its owner. Users who
146are members of the owner group can:
147
Fredrik Luthander8fa3d262011-11-07 17:04:01 +0100148* Add users and other groups to this group
149* Remove users and other groups from this group
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800150* Change the name of this group
151* Change the description of this group
152* Change the owner of this group, to another group
153
154It is permissible for a group to own itself, allowing the group
155members to directly manage who their peers are.
156
157Newly created groups are automatically created as owning themselves,
158with the creating user as the only member. This permits the group
159creator to add additional members, and change the owner to another
160group if desired.
161
162It is somewhat common to create two groups at the same time,
163for example `Foo` and `Foo-admin`, where the latter group
164`Foo-admin` owns both itself and also group `Foo`. Users who
165are members of `Foo-admin` can thus control the membership of
166`Foo`, without actually having the access rights granted to `Foo`.
167This configuration can help prevent accidental submits when the
168members of `Foo` have submit rights on a project, and the members of
169`Foo-admin` typically do not need to have such rights.
170
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200171
Thanh Ha6eed43f2013-04-11 21:03:55 -0400172[[ldap_groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800173== LDAP Groups
Thanh Ha6eed43f2013-04-11 21:03:55 -0400174
175LDAP groups are Account Groups that are maintained inside of your
176LDAP instance. If you are using LDAP to manage your groups they will
177not appear in the Groups list. However you can use them just like
178regular Account Groups by prefixing your group with "ldap/" in the
179Access Control for a project. For example "ldap/foo-project" will
180add the LDAP "foo-project" group to the access list.
181
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800182
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800183== Project Access Control Lists
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800184
lincolnfa7bdd32010-04-22 14:23:05 -0300185A system wide access control list affecting all projects is stored in
Shawn O. Pearcea0631822011-06-14 11:18:18 -0700186project "`All-Projects`". This inheritance can be configured
lincolnfa7bdd32010-04-22 14:23:05 -0300187through link:cmd-set-project-parent.html[gerrit set-project-parent].
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800188
189Per-project access control lists are also supported.
190
191Users are permitted to use the maximum range granted to any of their
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800192groups on a label. For example, a user is a member of `Foo Leads`, and
193the following ACLs are granted on a project:
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800194
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100195[options="header"]
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800196|===================================================
197|Group |Reference Name |Label |Range
198|Anonymous Users |refs/heads/* |Code-Review|-1..+1
199|Registered Users|refs/heads/* |Code-Review|-1..+2
200|Foo Leads |refs/heads/* |Code-Review|-2..0
201|===================================================
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800202
203Then the effective range permitted to be used by the user is
204`-2..+2`, as the user is a member of all three groups (see above
205about the system groups) and the maximum range is chosen (so the
206lowest value granted to any group, and the highest value granted
207to any group).
208
Nico Sallembienee6eaf02010-02-01 13:24:49 -0800209Reference-level access control is also possible.
210
211Permissions can be set on a single reference name to match one
212branch (e.g. `refs/heads/master`), or on a reference namespace
Jonathan Nieder5758f182015-03-30 11:28:55 -0700213(e.g. `+refs/heads/*+`) to match any branch starting with that
214prefix. So a permission with `+refs/heads/*+` will match
Nico Sallembienee6eaf02010-02-01 13:24:49 -0800215`refs/heads/master` and `refs/heads/experimental`, etc.
216
Shawn O. Pearce6d6d4512010-07-15 11:42:34 -0700217Reference names can also be described with a regular expression
Edwin Kempina2bf0832011-09-08 14:23:30 +0200218by prefixing the reference name with `^`. For example
219`^refs/heads/[a-z]{1,8}` matches all lower case branch names
Shawn O. Pearce6d6d4512010-07-15 11:42:34 -0700220between 1 and 8 characters long. Within a regular expression `.`
221is a wildcard matching any character, but may be escaped as `\.`.
Magnus Bäcke5611832011-02-02 08:57:15 +0100222The link:http://www.brics.dk/automaton/[dk.brics.automaton library]
223is used for evaluation of regular expression access control
224rules. See the library documentation for details on this
225particular regular expression flavor.
Shawn O. Pearce6d6d4512010-07-15 11:42:34 -0700226
227References can have the current user name automatically included,
228creating dynamic access controls that change to match the currently
229logged in user. For example to provide a personal sandbox space
Jonathan Nieder5758f182015-03-30 11:28:55 -0700230to all developers, `+refs/heads/sandbox/${username}/*+` allowing
Shawn O. Pearce6d6d4512010-07-15 11:42:34 -0700231the user 'joe' to use 'refs/heads/sandbox/joe/foo'.
232
Nico Sallembienee6eaf02010-02-01 13:24:49 -0800233When evaluating a reference-level access right, Gerrit will use
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700234the full set of access rights to determine if the user
235is allowed to perform a given action. For example, if a user is a
236member of `Foo Leads`, they are reviewing a change destined for
237the `refs/heads/qa` branch, and the following ACLs are granted
238on the project:
Nico Sallembienee6eaf02010-02-01 13:24:49 -0800239
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100240[options="header"]
Fredrik Luthander54abc352012-01-20 16:18:41 +0100241|===============================================================
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800242|Group |Reference Name|Label |Range |Exclusive
243|Registered Users |refs/heads/* |Code-Review| -1..+1 |
244|Foo Leads |refs/heads/* |Code-Review| -2..+2 |
245|QA Leads |refs/heads/qa |Code-Review| -2..+2 |
Fredrik Luthander54abc352012-01-20 16:18:41 +0100246|===============================================================
Nico Sallembienee6eaf02010-02-01 13:24:49 -0800247
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700248Then the effective range permitted to be used by the user is
249`-2..+2`, as the user's membership of `Foo Leads` effectively grant
250them access to the entire reference space, thanks to the wildcard.
251
252Gerrit also supports exclusive reference-level access control.
253
254It is possible to configure Gerrit to grant an exclusive ref level
255access control so that only users of a specific group can perform
Fredrik Luthander54abc352012-01-20 16:18:41 +0100256an operation on a project/reference pair. This is done by ticking
257the exclusive flag when setting the permission for the
258`refs/heads/qa` branch.
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700259
260For example, if a user who is a member of `Foo Leads` tries to
261review a change destined for branch `refs/heads/qa` in a project,
262and the following ACLs are granted:
263
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100264[options="header"]
Fredrik Luthander54abc352012-01-20 16:18:41 +0100265|==============================================================
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800266|Group |Reference Name|Label |Range |Exclusive
267|Registered Users|refs/heads/* |Code-Review| -1..+1 |
268|Foo Leads |refs/heads/* |Code-Review| -2..+2 |
269|QA Leads |refs/heads/qa |Code-Review| -2..+2 |X
Fredrik Luthander54abc352012-01-20 16:18:41 +0100270|==============================================================
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700271
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800272Then this user will not have `Code-Review` rights on that change,
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700273since there is an exclusive access right in place for the
274`refs/heads/qa` branch. This allows locking down access for a
275particular branch to a limited set of users, bypassing inherited
276rights and wildcards.
277
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800278In order to grant the ability to `Code-Review` to the members of
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700279`Foo Leads`, in `refs/heads/qa` then the following access rights
280would be needed:
281
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100282[options="header"]
Fredrik Luthander54abc352012-01-20 16:18:41 +0100283|==============================================================
284|Group |Reference Name|Category |Range |Exclusive
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800285|Registered Users|refs/heads/* |Code-Review| -1..+1 |
286|Foo Leads |refs/heads/* |Code-Review| -2..+2 |
287|QA Leads |refs/heads/qa |Code-Review| -2..+2 |X
288|Foo Leads |refs/heads/qa |Code-Review| -2..+2 |
Fredrik Luthander54abc352012-01-20 16:18:41 +0100289|==============================================================
Nico Sallembiena78a37c2010-05-04 11:49:12 -0700290
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200291
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800292=== OpenID Authentication
Shawn O. Pearcea2299662009-02-25 14:34:40 -0800293
294If the Gerrit instance is configured to use OpenID authentication,
295an account's effective group membership will be restricted to only
296the `Anonymous Users` and `Registered Users` groups, unless *all*
297of its OpenID identities match one or more of the patterns listed
Shawn O. Pearced7c026d2009-08-05 20:11:22 -0700298in the `auth.trustedOpenID` list from `gerrit.config`.
Shawn O. Pearcea2299662009-02-25 14:34:40 -0800299
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200300
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800301=== All Projects
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800302
Shawn O. Pearcea0631822011-06-14 11:18:18 -0700303Any access right granted to a group within `All-Projects`
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800304is automatically inherited by every other project in the same
305Gerrit instance. These rights can be seen, but not modified,
306in any other project's `Access` administration tab.
307
Fredrik Luthanderd9960882011-11-08 01:42:19 +0100308Only members of the groups with the `Administrate Server` capability
309may edit the access control list for `All-Projects`. By default this
310capability is given to the group `Administrators`, but can be given
311to more groups.
Shawn O. Pearcee2c2a222010-05-11 13:43:45 -0700312
313Ownership of this project cannot be delegated to another group.
314This restriction is by design. Granting ownership to another
315group gives nearly the same level of access as membership in
316`Administrators` does, as group members would be able to alter
Fredrik Luthanderd9960882011-11-08 01:42:19 +0100317permissions for every managed project including global capabilities.
Shawn O. Pearcee2c2a222010-05-11 13:43:45 -0700318
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200319
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800320=== Per-Project
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800321
Fredrik Luthanderda867882011-12-21 18:28:40 +0100322The per-project ACL is evaluated before the global `All-Projects` ACL,
323permitting some limited override capability to project owners. This
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100324behavior is generally only useful on the `Read` category when
325granting 'DENY' within a specific project to deny a group access.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800326
327
Fredrik Luthander98030252012-04-13 11:01:22 +0200328[[references]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800329== Special and magic references
Fredrik Luthander98030252012-04-13 11:01:22 +0200330
331The reference namespaces used in git are generally two, one for branches and
332one for tags:
333
334* +refs/heads/*+
335* +refs/tags/*+
336
337However, every reference under +refs/*+ is really available, and in Gerrit this
338opportunity for giving other refs a special meaning is used. In Gerrit they
339are sometimes used as magic/virtual references that give the push to Gerrit a
340special meaning.
341
342
343[[references_special]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800344=== Special references
Fredrik Luthander98030252012-04-13 11:01:22 +0200345
346The special references have content that's either generated by Gerrit or
347contains important project configuration that Gerrit needs. When making
348changes to these references, Gerrit will take extra precautions to verify the
349contents compatibility at upload time.
350
351
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800352==== refs/changes/*
Fredrik Luthander98030252012-04-13 11:01:22 +0200353
354Under this namespace each uploaded patch set for every change gets a static
355reference in their git. The format is convenient but still intended to scale to
356hundreds of thousands of patch sets. To access a given patch set you will
357need the change number and patch set number.
358
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800359--
Fredrik Luthander98030252012-04-13 11:01:22 +0200360'refs/changes/'<last two digits of change number>/
361 <change number>/
362 <patch set number>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800363--
Fredrik Luthander98030252012-04-13 11:01:22 +0200364
365You can also find these static references linked on the page of each change.
366
367
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800368==== refs/meta/config
Fredrik Luthander98030252012-04-13 11:01:22 +0200369
Matt Baker3a40c6d2013-11-26 21:01:17 -0700370This is where the Gerrit configuration of each project resides. This
Fredrik Luthander98030252012-04-13 11:01:22 +0200371branch contains several files of importance: +project.config+, +groups+ and
Matt Baker3a40c6d2013-11-26 21:01:17 -0700372+rules.pl+. Together they control access and behavior during the change
Fredrik Luthander98030252012-04-13 11:01:22 +0200373review process.
374
375
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800376==== refs/meta/dashboards/*
Fredrik Luthander98030252012-04-13 11:01:22 +0200377
378There's a dedicated page where you can read more about
379link:user-dashboards.html[User Dashboards].
380
381
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800382==== refs/notes/review
Fredrik Luthander98030252012-04-13 11:01:22 +0200383
384Autogenerated copy of review notes for all changes in the git. Each log entry
385on the refs/notes/review branch also references the patch set on which the
386review is made. This functionality is provided by the review-notes plugin.
387
388
389[[references_magic]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800390=== Magic references
Fredrik Luthander98030252012-04-13 11:01:22 +0200391
392These are references with added functionality to them compared to a regular
393git push operation.
394
Edwin Kempin4bf01962014-04-16 16:47:10 +0200395[[refs_for]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800396==== refs/for/<branch ref>
Fredrik Luthander98030252012-04-13 11:01:22 +0200397
398Most prominent is the `refs/for/<branch ref>` reference which is the reference
399upon which we build the code review intercept before submitting a commit to
400the branch it's uploaded to.
401
402Further documentation on how to push can be found on the
403link:user-upload.html#push_create[Upload changes] page.
404
405
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800406==== refs/publish/*
Fredrik Luthander98030252012-04-13 11:01:22 +0200407
Jonathan Nieder5758f182015-03-30 11:28:55 -0700408`+refs/publish/*+` is an alternative name to `+refs/for/*+` when pushing new changes
Fredrik Luthander98030252012-04-13 11:01:22 +0200409and patch sets.
410
411
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800412==== refs/drafts/*
Fredrik Luthander98030252012-04-13 11:01:22 +0200413
Jonathan Nieder5758f182015-03-30 11:28:55 -0700414Push to `+refs/drafts/*+` creates a change like push to `+refs/for/*+`, except the
Fredrik Luthander98030252012-04-13 11:01:22 +0200415resulting change remains hidden from public review. You then have the option
416of adding individual reviewers before making the change public to all. The
417change page will have a 'Publish' button which allows you to convert individual
418draft patch sets of a change into public patch sets for review.
419
Jonathan Nieder5758f182015-03-30 11:28:55 -0700420To block push permission to `+refs/drafts/*+` the following permission rule can
David Ostrovsky07ddca52014-01-21 22:51:47 +0100421be configured:
422
423====
424 [access "refs/drafts/*"]
425 push = block group Anonymous Users
426====
427
Fredrik Luthander98030252012-04-13 11:01:22 +0200428
Fredrik Luthander5ccf2e42013-05-08 01:06:25 +0200429[[access_categories]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800430== Access Categories
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800431
Fredrik Luthander5ccf2e42013-05-08 01:06:25 +0200432Gerrit has several permission categories that can be granted to groups
433within projects, enabling functionality for that group's members.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800434
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200435
Fredrik Luthander69236de2013-05-09 14:50:39 +0200436
Chad Horohoe029c85a2012-06-07 16:10:14 -0400437[[category_abandon]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800438=== Abandon
Chad Horohoe029c85a2012-06-07 16:10:14 -0400439
440This category controls whether users are allowed to abandon changes
441to projects in Gerrit. It can give permission to abandon a specific
442change to a given ref.
443
David Pursehousec795eb12013-07-05 14:20:28 +0900444This also grants the permission to restore a change if the user also
445has link:#category_push[push permission] on the change's destination
446ref.
Chad Horohoe35ced0a2012-06-27 19:20:34 -0400447
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200448
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100449[[category_create]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800450=== Create Reference
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100451
452The create reference category controls whether it is possible to
453create new references, branches or tags. This implies that the
454reference must not already exist, it's not a destructive permission
David Pursehouse221d4f62012-06-08 17:38:08 +0900455in that you can't overwrite or remove any previously existing
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100456references (and also discard any commits in the process).
457
458It's probably most common to either permit the creation of a single
459branch in many gits (by granting permission on a parent project), or
460to grant this permission to a name pattern of branches.
461
462This permission is often given in conjunction with regular push
463branch permissions, allowing the holder of both to create new branches
464as well as bypass review for new commits on that branch.
465
David Pursehouse221d4f62012-06-08 17:38:08 +0900466To push lightweight (non-annotated) tags, grant
Jonathan Nieder5758f182015-03-30 11:28:55 -0700467`Create Reference` for reference name `+refs/tags/*+`, as lightweight
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100468tags are implemented just like branches in Git.
469
470For example, to grant the possibility to create new branches under the
471namespace `foo`, you have to grant this permission on
Jonathan Nieder5758f182015-03-30 11:28:55 -0700472`+refs/heads/foo/*+` for the group that should have it.
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100473Finally, if you plan to grant each user a personal namespace in
474where they are free to create as many branches as they wish, you
475should grant the create reference permission so it's possible
476to create new branches. This is done by using the special
477`${username}` keyword in the reference pattern, e.g.
Jonathan Nieder5758f182015-03-30 11:28:55 -0700478`+refs/heads/sandbox/${username}/*+`. If you do, it's also recommended
Fredrik Luthandere9eeeea2011-12-08 16:45:32 +0100479you grant the users the push force permission to be able to clean up
480stale branches.
481
482
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100483[[category_forge_author]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800484=== Forge Author
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100485
486Normally Gerrit requires the author and the committer identity
487lines in a Git commit object (or tagger line in an annotated tag) to
488match one of the registered email addresses of the uploading user.
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100489This permission allows users to bypass parts of that validation, which
490may be necessary when mirroring changes from an upstream project.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100491
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100492Permits the use of an unverified author line in commit objects.
493This can be useful when applying patches received by email from
4943rd parties, when cherry-picking changes written by others across
495branches, or when amending someone else's commit to fix up a minor
496problem before submitting.
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100497
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100498By default this is granted to `Registered Users` in all projects,
499but a site administrator may disable it if verified authorship
500is required.
501
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100502
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100503[[category_forge_committer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800504=== Forge Committer
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100505
506Normally Gerrit requires the author and the committer identity
507lines in a Git commit object (or tagger line in an annotated tag) to
508match one of the registered email addresses of the uploading user.
509This permission allows users to bypass parts of that validation, which
510may be necessary when mirroring changes from an upstream project.
511
512Allows the use of an unverified committer line in commit objects, or an
513unverified tagger line in annotated tag objects. Typically this is only
514required when mirroring commits from an upstream project repository.
515
516
517[[category_forge_server]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800518=== Forge Server
Fredrik Luthander8f430f12011-12-27 13:40:43 +0100519
520Normally Gerrit requires the author and the committer identity
521lines in a Git commit object (or tagger line in an annotated tag) to
522match one of the registered email addresses of the uploading user.
523This permission allows users to bypass parts of that validation, which
524may be necessary when mirroring changes from an upstream project.
525
526Allows the use of the server's own name and email on the committer
527line of a new commit object. This should only be necessary when force
528pushing a commit history which has been rewritten by 'git filter-branch'
529and that contains merge commits previously created by this Gerrit Code
530Review server.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100531
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100532
533[[category_owner]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800534=== Owner
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100535
536The `Owner` category controls which groups can modify the project's
537configuration. Users who are members of an owner group can:
538
539* Change the project description
Fredrik Luthander9c949382014-03-22 09:19:45 -0700540* Create a branch via the ssh command link:cmd-create-branch.html['create-branch']
Mani Chandel7ec4ac72013-12-10 14:50:33 +0530541* Create/delete a branch through the web UI
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100542* Grant/revoke any access rights, including `Owner`
543
Mani Chandel7ec4ac72013-12-10 14:50:33 +0530544To get SSH branch access project owners must grant an access right to a group
545they are a member of, just like for any other user.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100546
547Ownership over a particular branch subspace may be delegated by
548entering a branch pattern. To delegate control over all branches
549that begin with `qa/` to the QA group, add `Owner` category
Jonathan Nieder5758f182015-03-30 11:28:55 -0700550for reference `+refs/heads/qa/*+`. Members of the QA group can
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100551further refine access, but only for references that begin with
Fredrik Luthander8fa3d262011-11-07 17:04:01 +0100552`refs/heads/qa/`. See <<project_owners,project owners>> to find
553out more about this role.
554
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100555
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100556[[category_push]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800557=== Push
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100558
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100559This category controls how users are allowed to upload new commits
560to projects in Gerrit. It can either give permission to push
561directly into a branch, bypassing any code review process
562that would otherwise be used. Or it may give permission to upload
563new changes for code review, this depends on which namespace the
564permission is granted to.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100565
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100566
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100567[[category_push_direct]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800568==== Direct Push
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100569
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100570Any existing branch can be fast-forwarded to a new commit.
Robin Rosenberg524a3032012-10-14 14:24:36 +0200571Creation of new branches is controlled by the
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100572link:access-control.html#category_create['Create Reference']
573category. Deletion of existing branches is rejected. This is the
574safest mode as commits cannot be discarded.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100575
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100576* Force option
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100577+
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100578Allows an existing branch to be deleted. Since a force push is
579effectively a delete immediately followed by a create, but performed
580atomically on the server and logged, this option also permits forced
581push updates to branches. Enabling this option allows existing commits
582to be discarded from a project history.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100583
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100584The push category is primarily useful for projects that only want to
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100585take advantage of Gerrit's access control features and do not need
586its code review functionality. Projects that need to require code
587reviews should not grant this category.
588
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100589
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100590[[category_push_review]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800591==== Upload To Code Review
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100592
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100593The `Push` access right granted on the namespace
594`refs/for/refs/heads/BRANCH` permits the user to upload a non-merge
595commit to the project's `refs/for/BRANCH` namespace, creating a new
596change for code review.
597
598A user must be able to clone or fetch the project in order to create
599a new commit on their local system, so in practice they must also
600have the `Read` access granted to upload a change.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100601
602For an open source, public Gerrit installation, it is common to
Jonathan Nieder5758f182015-03-30 11:28:55 -0700603grant `Read` and `Push` for `+refs/for/refs/heads/*+`
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100604to `Registered Users` in the `All-Projects` ACL. For more
605private installations, its common to simply grant `Read` and
Jonathan Nieder5758f182015-03-30 11:28:55 -0700606`Push` for `+refs/for/refs/heads/*+` to all users of a project.
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100607
608* Force option
609+
610The force option has no function when granted to a branch in the
Jonathan Nieder5758f182015-03-30 11:28:55 -0700611`+refs/for/refs/heads/*+` namespace.
Fredrik Luthanderea13ca52011-12-29 11:36:48 +0100612
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100613
Fredrik Luthanderbf568572012-01-18 11:17:00 +0100614[[category_push_merge]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800615=== Push Merge Commits
Fredrik Luthanderbf568572012-01-18 11:17:00 +0100616
Magnus Bäck282c1022012-04-18 15:39:17 -0400617The `Push Merge Commit` access right permits the user to upload merge
Gustaf Lundha28a1d22013-05-08 15:05:12 +0100618commits. It's an add-on to the <<category_push,Push>> access right, and
Magnus Bäck282c1022012-04-18 15:39:17 -0400619so it won't be sufficient with only `Push Merge Commit` granted for a
620push to happen. Some projects wish to restrict merges to being created
621by Gerrit. By granting `Push` without `Push Merge Commit`, the only
Edwin Kempinaef5d6e2012-01-24 09:04:54 +0100622merges that enter the system will be those created by Gerrit.
Fredrik Luthanderbf568572012-01-18 11:17:00 +0100623
Jonathan Niederdaf8bd42013-10-01 15:06:14 -0700624The reference name connected to a `Push Merge Commit` entry must always
625be prefixed with `refs/for/`, for example `refs/for/refs/heads/BRANCH`.
626This applies even for an entry that complements a `Push` entry for
627`refs/heads/BRANCH` that allows direct pushes of non-merge commits, and
628the intention of the `Push Merge Commit` entry is to allow direct pushes
629of merge commits.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100630
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200631
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100632[[category_push_annotated]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800633=== Push Annotated Tag
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100634
David Pursehouse690cebe2012-12-12 19:22:45 +0900635This category permits users to push an annotated tag object into the
636project's repository. Typically this would be done with a command line
637such as:
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100638
639====
640 git push ssh://USER@HOST:PORT/PROJECT tag v1.0
641====
642
David Pursehouse690cebe2012-12-12 19:22:45 +0900643Or:
644
645====
646 git push https://HOST/PROJECT tag v1.0
647====
648
David Pursehouseb429ce12012-12-12 11:04:40 +0900649Tags must be annotated (created with `git tag -a`), should exist in
650the `refs/tags/` namespace, and should be new.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100651
652This category is intended to be used to publish tags when a project
653reaches a stable release point worth remembering in history.
654
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100655It allows for a new annotated (unsigned) tag to be created. The
656tagger email address must be verified for the current user.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100657
658To push tags created by users other than the current user (such
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100659as tags mirrored from an upstream project), `Forge Committer Identity`
660must be also granted in addition to `Push Annotated Tag`.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100661
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100662To push lightweight (non annotated) tags, grant
663<<category_create,`Create Reference`>> for reference name
Jonathan Nieder5758f182015-03-30 11:28:55 -0700664`+refs/tags/*+`, as lightweight tags are implemented just like
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100665branches in Git.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100666
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100667To delete or overwrite an existing tag, grant `Push` with the force
Jonathan Nieder5758f182015-03-30 11:28:55 -0700668option enabled for reference name `+refs/tags/*+`, as deleting a tag
Fredrik Luthanderd7749862012-01-20 07:29:43 +0100669requires the same permission as deleting a branch.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100670
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100671
David Pursehouseb429ce12012-12-12 11:04:40 +0900672[[category_push_signed]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800673=== Push Signed Tag
David Pursehouseb429ce12012-12-12 11:04:40 +0900674
David Pursehouse690cebe2012-12-12 19:22:45 +0900675This category permits users to push a PGP signed tag object into the
676project's repository. Typically this would be done with a command
677line such as:
David Pursehouseb429ce12012-12-12 11:04:40 +0900678
679====
680 git push ssh://USER@HOST:PORT/PROJECT tag v1.0
681====
682
David Pursehouse690cebe2012-12-12 19:22:45 +0900683Or:
684
685====
686 git push https://HOST/PROJECT tag v1.0
687====
688
David Pursehouseb429ce12012-12-12 11:04:40 +0900689Tags must be signed (created with `git tag -s`), should exist in the
690`refs/tags/` namespace, and should be new.
691
692
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100693[[category_read]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800694=== Read
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100695
696The `Read` category controls visibility to the project's
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100697changes, comments, code diffs, and Git access over SSH or HTTP.
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100698A user must have this access granted in order to see a project, its
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100699changes, or any of its data.
700
701This category has a special behavior, where the per-project ACL is
702evaluated before the global all projects ACL. If the per-project
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100703ACL has granted `Read` with 'DENY', and does not otherwise grant
704`Read` with 'ALLOW', then a `Read` in the all projects ACL
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100705is ignored. This behavior is useful to hide a handful of projects
706on an otherwise public server.
707
708For an open source, public Gerrit installation it is common to grant
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100709`Read` to `Anonymous Users` in the `All-Projects` ACL, enabling
710casual browsing of any project's changes, as well as fetching any
711project's repository over SSH or HTTP. New projects can be
712temporarily hidden from public view by granting `Read` with 'DENY'
713to `Anonymous Users` and granting `Read` to the project owner's
714group within the per-project ACL.
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100715
716For a private Gerrit installation using a trusted HTTP authentication
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100717source, granting `Read` to `Registered Users` may be more
Fredrik Luthanderdb7679a2011-11-03 08:52:56 +0100718typical, enabling read access only to those users who have been
719able to authenticate through the HTTP access controls. This may
720be suitable in a corporate deployment if the HTTP access control
721is already restricted to the correct set of users.
722
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100723
Edwin Kempinfd330fc2012-05-09 21:09:55 +0200724[[category_rebase]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800725=== Rebase
Edwin Kempinfd330fc2012-05-09 21:09:55 +0200726
727This category permits users to rebase changes via the web UI by pushing
728the `Rebase Change` button.
729
730The change owner and submitters can always rebase changes in the web UI
731(even without having the `Rebase` access right assigned).
732
733Users without this access right who are able to upload new patch sets
734can still do the rebase locally and upload the rebased commit as a new
735patch set.
736
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200737
Chad Horohoec626f3c2012-09-13 11:04:20 -0700738[[category_remove_reviewer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800739=== Remove Reviewer
Chad Horohoec626f3c2012-09-13 11:04:20 -0700740
741This category permits users to remove other users from the list of
742reviewers on a change.
743
David Pursehouseb3d13832014-12-04 14:50:37 +0900744Change owners can always remove reviewers who have given a zero or positive
745score (even without having the `Remove Reviewer` access right assigned).
746
747Project owners and site administrators can always remove any reviewer (even
748without having the `Remove Reviewer` access right assigned).
Chad Horohoec626f3c2012-09-13 11:04:20 -0700749
750Users without this access right can only remove themselves from the
751reviewer list on a change.
752
Edwin Kempinfd330fc2012-05-09 21:09:55 +0200753
Fredrik Luthander5ccf2e42013-05-08 01:06:25 +0200754[[category_review_labels]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800755=== Review Labels
Fredrik Luthander5ccf2e42013-05-08 01:06:25 +0200756
757For every configured label `My-Name` in the project, there is a
758corresponding permission `label-My-Name` with a range corresponding to
Shawn Pearce9d783122013-06-11 18:18:03 -0700759the defined values. There is also a corresponding `labelAs-My-Name`
760permission that enables editing another user's label.
Fredrik Luthander5ccf2e42013-05-08 01:06:25 +0200761
762Gerrit comes pre-configured with a default 'Code-Review' label that can
763be granted to groups within projects, enabling functionality for that
764group's members. link:config-labels.html[Custom labels] may also be
765defined globally or on a per-project basis.
766
767
Fredrik Luthander5e1b51b2012-01-20 13:06:06 +0100768[[category_submit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800769=== Submit
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800770
David Pursehouse6bf46ed2015-02-04 20:31:23 +0900771This category permits users to submit changes.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800772
773Submitting a change causes it to be merged into the destination
774branch as soon as possible, making it a permanent part of the
David Pursehouse22bd6f92014-02-20 21:11:01 +0900775project's history.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800776
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800777In order to submit, all labels (such as `Verified` and `Code-Review`,
778above) must enable submit, and also must not block it. See above for
779details on each label.
Shawn O. Pearce4b122b82009-02-18 18:22:14 -0800780
Edwin Kempinbfa06212013-04-04 16:06:39 +0200781To link:user-upload.html#auto_merge[immediately submit a change on push]
782the caller needs to have the Submit permission on `refs/for/<ref>`
783(e.g. on `refs/for/refs/heads/master`).
784
David Pursehouse22bd6f92014-02-20 21:11:01 +0900785[[category_submit_on_behalf_of]]
786=== Submit (On Behalf Of)
787
788This category permits users who have also been granted the `Submit`
789permission to submit changes on behalf of another user.
790
791Note that this permission is named `submitAs` in the `project.config`
792file.
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100793
David Pursehouse5ae73002012-11-01 15:22:26 +0900794[[category_view_drafts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800795=== View Drafts
David Pursehouse5ae73002012-11-01 15:22:26 +0900796
797This category permits users to view draft changes uploaded by other
798users.
799
800The change owner and any explicitly added reviewers can always see
801draft changes (even without having the `View Drafts` access right
802assigned).
803
804
David Pursehousebe7f4582012-12-12 11:21:29 +0900805[[category_publish_drafts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800806=== Publish Drafts
David Pursehousebe7f4582012-12-12 11:21:29 +0900807
808This category permits users to publish draft changes uploaded by other
809users.
810
811The change owner can always publish draft changes (even without having
812the `Publish Drafts` access right assigned).
813
814
815[[category_delete_drafts]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800816=== Delete Drafts
David Pursehousebe7f4582012-12-12 11:21:29 +0900817
818This category permits users to delete draft changes uploaded by other
819users.
820
821The change owner can always delete draft changes (even without having
822the `Delete Drafts` access right assigned).
823
824
David Pursehouse59aee362012-11-15 17:25:17 +0900825[[category_edit_topic_name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800826=== Edit Topic Name
David Pursehouse59aee362012-11-15 17:25:17 +0900827
828This category permits users to edit the topic name of a change that
829is uploaded for review.
830
831The change owner, branch owners, project owners, and site administrators
832can always edit the topic name (even without having the `Edit Topic Name`
833access right assigned).
834
Edwin Kempin1f77b532013-11-08 07:16:31 +0100835Whether the topic can be edited on closed changes can be controlled
836by the 'Force Edit' flag. If this flag is not set the topic can only be
837edited on open changes.
838
David Pursehouse59aee362012-11-15 17:25:17 +0900839
David Pursehousede711702014-09-10 16:23:34 +0200840[[category_edit_hashtags]]
841=== Edit Hashtags
842
843This category permits users to add or remove hashtags on a change that
844is uploaded for review.
845
846The change owner, branch owners, project owners, and site administrators
847can always edit or remove hashtags (even without having the `Edit Hashtags`
848access right assigned).
849
850
Edwin Kempin4bf01962014-04-16 16:47:10 +0200851[[example_roles]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800852== Examples of typical roles in a project
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100853
854Below follows a set of typical roles on a server and which access
855rights these roles typically should be granted. You may see them as
David Pursehouse221d4f62012-06-08 17:38:08 +0900856general guidelines for a typical way to set up your project on a
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100857brand new Gerrit instance.
858
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +0200859
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100860[[examples_contributor]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800861=== Contributor
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100862
863This is the typical user on a public server. They are able to read
864your project and upload new changes to it. They are able to give
865feedback on other changes as well, but are unable to block or approve
866any changes.
867
868Suggested access rights to grant:
869
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800870* xref:category_read[`Read`] on 'refs/heads/\*' and 'refs/tags/*'
871* xref:category_push[`Push`] to 'refs/for/refs/heads/*'
872* link:config-labels.html#label_Code-Review[`Code-Review`] with range '-1' to '+1' for 'refs/heads/*'
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100873
Fredrik Luthanderd6c59252014-03-17 00:56:04 +0100874If it's desired to have the possibility to upload temporarily hidden
875changes there's a specific permission for that. This enables someone
876to add specific reviewers for early feedback before making the change
877publically visible. If you want to allow others than the owners to
878publish a draft you also need to grant them `Publish Drafts`.
879
880Optional access rights to grant:
881
882* xref:category_push[`Push`] to 'refs/drafts/*'
883* xref:category_publish_drafts[`Publish Drafts`] to 'refs/heads/*'
884
Fredrik Luthanderbc75ef72012-01-26 15:57:08 +0100885
Fredrik Luthander654161c2012-01-31 14:42:36 +0100886[[examples_developer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800887=== Developer
Fredrik Luthander654161c2012-01-31 14:42:36 +0100888
889This is the typical core developer on a public server. They are able
890to read the project, upload changes to a branch. They are allowed to
891push merge commits to merge branches together. Also, they are allowed
892to forge author identity, thus handling commits belonging to others
893than themselves, effectively allowing them to transfer commits
894between different branches.
895
896They are furthermore able to code review and verify commits, and
897eventually submit them. If you have an automated CI system that
898builds all uploaded patch sets you might want to skip the
899verification rights for the developer and let the CI system do that
900exclusively.
901
902Suggested access rights to grant:
903
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800904* xref:category_read[`Read`] on 'refs/heads/\*' and 'refs/tags/*'
905* xref:category_push[`Push`] to 'refs/for/refs/heads/*'
906* xref:category_push_merge[`Push merge commit`] to 'refs/for/refs/heads/*'
907* xref:category_forge_author[`Forge Author Identity`] to 'refs/heads/*'
908* link:config-labels.html#label_Code-Review[`Label: Code-Review`] with range '-2' to '+2' for 'refs/heads/*'
Peter Jönsson3bfcae72013-07-17 22:06:32 +0200909* link:config-labels.html#label_Verified[`Label: Verified`] with range '-1' to '+1' for 'refs/heads/*'
Edwin Kempin7b1897c2015-04-16 15:13:44 +0200910* xref:category_submit[`Submit`] on 'refs/heads/*'
Fredrik Luthander654161c2012-01-31 14:42:36 +0100911
912If the project is small or the developers are seasoned it might make
913sense to give them the freedom to push commits directly to a branch.
914
915Optional access rights to grant:
916
917* <<category_push,`Push`>> to 'refs/heads/*'
918* <<category_push_merge,`Push merge commit`>> to 'refs/heads/*'
919
920
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100921[[examples_cisystem]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800922=== CI system
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100923
Gustaf Lundha28a1d22013-05-08 15:05:12 +0100924A typical Continuous Integration system should be able to download new changes
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100925to build and then leave a verdict somehow.
926
927As an example, the popular
928link:https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger[gerrit-trigger plugin]
929for Jenkins/Hudson can set labels at:
930
931* The start of a build
932* A successful build
933* An unstable build (tests fails)
934* A failed build
935
Peter Jönsson3bfcae72013-07-17 22:06:32 +0200936Usually the range chosen for this verdict is the `Verified` label. Depending on
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100937the size of your project and discipline of involved developers you might want
Peter Jönsson3bfcae72013-07-17 22:06:32 +0200938to limit access right to the +1 `Verified` label to the CI system only. That
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100939way it's guaranteed that submitted commits always get built and pass tests
940successfully.
941
942If the build doesn't complete successfully the CI system can set the
Peter Jönsson3bfcae72013-07-17 22:06:32 +0200943`Verified` label to -1. However that means that a failed build will block
944submit of the change even if someone else sets `Verified` +1. Depending on the
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100945project and how much the CI system can be trusted for accurate results, a
946blocking label might not be feasible. A recommended alternative is to set the
947label `Code-review` to -1 instead, as it isn't a blocking label but still
David Pursehouse221d4f62012-06-08 17:38:08 +0900948shows a red label in the Gerrit UI. Optionally, to enable the possibility to
949deliver different results (build error vs unstable for instance), it's also
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100950possible to set `Code-review` +1 as well.
951
Edwin Kempina2e13cf2012-03-30 09:02:36 +0200952If pushing new changes is granted, it's possible to automate cherry-pick of
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100953submitted changes for upload to other branches under certain conditions. This
954is probably not the first step of what a project wants to automate however,
955and so the push right can be found under the optional section.
956
957Suggested access rights to grant, that won't block changes:
958
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800959* xref:category_read[`Read`] on 'refs/heads/\*' and 'refs/tags/*'
960* link:config-labels.html#label_Code-Review[`Label: Code-Review`] with range '-1' to '0' for 'refs/heads/*'
Peter Jönsson3bfcae72013-07-17 22:06:32 +0200961* link:config-labels.html#label_Verified[`Label: Verified`] with range '0' to '+1' for 'refs/heads/*'
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100962
963Optional access rights to grant:
964
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800965* link:config-labels.html#label_Code-Review[`Label: Code-Review`] with range '-1' to '+1' for 'refs/heads/*'
966* xref:category_push[`Push`] to 'refs/for/refs/heads/*'
Fredrik Luthanderf2105be2012-01-27 12:44:05 +0100967
968
Fredrik Luthanderfe720022012-03-22 17:29:39 +0100969[[examples_integrator]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800970=== Integrator
Fredrik Luthanderfe720022012-03-22 17:29:39 +0100971
972Integrators are like developers but with some additional rights granted due
973to their administrative role in a project. They can upload or push any commit
974with any committer email (not just their own) and they can also create new
975tags and branches.
976
977Suggested access rights to grant:
978
979* <<examples_developer,Developer rights>>
980* <<category_push,`Push`>> to 'refs/heads/*'
981* <<category_push_merge,`Push merge commit`>> to 'refs/heads/*'
Fredrik Luthander404a2852012-10-10 08:51:22 +0200982* <<category_forge_committer,`Forge Committer Identity`>> to 'refs/for/refs/heads/*'
Fredrik Luthanderfe720022012-03-22 17:29:39 +0100983* <<category_create,`Create Reference`>> to 'refs/heads/*'
984* <<category_push_annotated,`Push Annotated Tag`>> to 'refs/tags/*'
985
986
Fredrik Luthander9c645362012-03-22 18:10:42 +0100987[[examples_project-owner]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800988=== Project owner
Fredrik Luthander9c645362012-03-22 18:10:42 +0100989
990The project owner is almost like an integrator but with additional destructive
991power in the form of being able to delete branches. Optionally these users
992also have the power to configure access rights in gits assigned to them.
993
994[WARNING]
Gustaf Lundha28a1d22013-05-08 15:05:12 +0100995These users should be really knowledgeable about git, for instance knowing why
Fredrik Luthander9c645362012-03-22 18:10:42 +0100996tags never should be removed from a server. This role is granted potentially
997destructive access rights and cleaning up after such a mishap could be time
998consuming!
999
1000Suggested access rights to grant:
1001
1002* <<examples_integrator,Integrator rights>>
1003* <<category_push,`Push`>> with the force option to 'refs/heads/\*' and 'refs/tags/*'
1004
1005Optional access right to grant:
1006
1007* <<category_owner,`Owner`>> in the gits they mostly work with.
1008
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001009
Fredrik Luthander5a8e7d82012-03-22 17:29:39 +01001010[[examples_administrator]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001011=== Administrator
Fredrik Luthander5a8e7d82012-03-22 17:29:39 +01001012
1013The administrator role is the most powerful role known in the Gerrit universe.
Fredrik Luthanderb8eaa082014-03-17 01:02:22 +01001014This role may grant itself (or others) any access right. By default the
Fredrik Luthander5a8e7d82012-03-22 17:29:39 +01001015<<administrators,`Administrators` group>> is the group that has this role.
1016
1017Mandatory access rights:
1018
1019* <<capability_administrateServer,The `Administrate Server` capability>>
1020
1021Suggested access rights to grant:
1022
Fredrik Luthanderb8eaa082014-03-17 01:02:22 +01001023* <<examples_project-owner,`Project owner rights`>>
1024* Any <<global_capabilities,`capabilities`>> needed by the administrator
Fredrik Luthander5a8e7d82012-03-22 17:29:39 +01001025
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001026
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001027== Enforcing site wide access policies
Sasa Zivkovd589f462013-02-12 14:27:09 +01001028
Jonathan Nieder5758f182015-03-30 11:28:55 -07001029By granting the <<category_owner,`Owner`>> access right on the `+refs/*+` to a
Sasa Zivkovd589f462013-02-12 14:27:09 +01001030group, Gerrit administrators can delegate the responsibility of maintaining
1031access rights for that project to that group.
1032
1033In a corporate deployment it is often necessary to enforce some access
1034policies. An example could be that no-one can update or delete a tag, not even
1035the project owners. The 'ALLOW' and 'DENY' rules are not enough for this
1036purpose as project owners can grant themselves any access right they wish and,
1037thus, effectively override any inherited access rights from the
1038"`All-Projects`" or some other common parent project.
1039
1040What is needed is a mechanism to block a permission in a parent project so
1041that even project owners cannot allow a blocked permission in their child
1042project. Still, project owners should retain the possibility to manage all
1043non-blocked rules as they wish. This gives best of both worlds:
1044
1045* Gerrit administrators can concentrate on enforcing site wide policies
1046 and providing a meaningful set of default access permissions
1047* Project owners can manage access rights of their projects without a danger
1048 of violating a site wide policy
1049
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001050
Edwin Kempin60ab8532013-03-27 14:33:46 +01001051[[block]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001052=== 'BLOCK' access rule
Sasa Zivkovd589f462013-02-12 14:27:09 +01001053
1054The 'BLOCK' rule blocks a permission globally. An inherited 'BLOCK' rule cannot
Sasa Zivkovcff084b2013-01-15 18:52:32 +01001055be overridden in the inheriting project. Any 'ALLOW' rule, from a different
1056access section or from an inheriting project, which conflicts with an
1057inherited 'BLOCK' rule will not be honored. Searching for 'BLOCK' rules, in
Sasa Zivkovd589f462013-02-12 14:27:09 +01001058the chain of parent projects, ignores the Exclusive flag that is normally
1059applied to access sections.
1060
1061A 'BLOCK' rule that blocks the 'push' permission blocks any type of push,
1062force or not. A blocking force push rule blocks only force pushes, but
1063allows non-forced pushes if an 'ALLOW' rule would have permitted it.
1064
1065It is also possible to block label ranges. To block a group 'X' from voting
1066'-2' and '+2', but keep their existing voting permissions for the '-1..+1'
1067range intact we would define:
1068
1069====
1070 [access "refs/heads/*"]
1071 label-Code-Review = block -2..+2 group X
1072====
1073
1074The interpretation of the 'min..max' range in case of a blocking rule is: block
1075every vote from '-INFINITE..min' and 'max..INFINITE'. For the example above it
1076means that the range '-1..+1' is not affected by this block.
1077
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001078=== 'BLOCK' and 'ALLOW' rules in the same access section
Sasa Zivkovcff084b2013-01-15 18:52:32 +01001079
1080When an access section of a project contains a 'BLOCK' and an 'ALLOW' rule for
1081the same permission then this 'ALLOW' rule overrides the 'BLOCK' rule:
1082
1083====
1084 [access "refs/heads/*"]
1085 push = block group X
1086 push = group Y
1087====
1088
1089In this case a user which is a member of the group 'Y' will still be allowed to
1090push to 'refs/heads/*' even if it is a member of the group 'X'.
1091
1092NOTE: An 'ALLOW' rule overrides a 'BLOCK' rule only when both of them are
1093inside the same access section of the same project. An 'ALLOW' rule in a
1094different access section of the same project or in any access section in an
1095inheriting project cannot override a 'BLOCK' rule.
1096
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001097
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001098=== Examples
Sasa Zivkovd589f462013-02-12 14:27:09 +01001099
1100The following examples show some possible use cases for the 'BLOCK' rules.
1101
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001102==== Make sure no one can update or delete a tag
Sasa Zivkovd589f462013-02-12 14:27:09 +01001103
1104This requirement is quite common in a corporate deployment where
1105reproducibility of a build must be guaranteed. To achieve that we block 'push'
1106permission for the <<anonymous_users,'Anonymous Users'>> in "`All-Projects`":
1107
1108====
1109 [access "refs/tags/*"]
1110 push = block group Anonymous Users
1111====
1112
1113By blocking the <<anonymous_users,'Anonymous Users'>> we effectively block
1114everyone as everyone is a member of that group. Note that the permission to
1115create a tag is still necessary. Assuming that only <<category_owner,project
1116owners>> are allowed to create tags, we would extend the example above:
1117
1118====
1119 [access "refs/tags/*"]
1120 push = block group Anonymous Users
1121 create = group Project Owners
1122 pushTag = group Project Owners
1123====
Fredrik Luthander9c645362012-03-22 18:10:42 +01001124
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001125
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001126==== Let only a dedicated group vote in a special category
Sasa Zivkovcff084b2013-01-15 18:52:32 +01001127
1128Assume there is a more restrictive process for submitting changes in stable
1129release branches which is manifested as a new voting category
1130'Release-Process'. Assume we want to make sure that only a 'Release Engineers'
1131group can vote in this category and that even project owners cannot approve
1132this category. We have to block everyone except the 'Release Engineers' to vote
1133in this category and, of course, allow 'Release Engineers' to vote in that
1134category. In the "`All-Projects`" we define the following rules:
1135
1136====
1137 [access "refs/heads/stable*"]
Gustaf Lundha28a1d22013-05-08 15:05:12 +01001138 label-Release-Process = block -1..+1 group Anonymous Users
1139 label-Release-Process = -1..+1 group Release Engineers
Sasa Zivkovcff084b2013-01-15 18:52:32 +01001140====
1141
David Pursehouse8becc2a2013-04-23 18:51:04 +09001142[[global_capabilities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001143== Global Capabilities
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001144
David Pursehouse8becc2a2013-04-23 18:51:04 +09001145The global capabilities control actions that the administrators of
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001146the server can perform which usually affect the entire
1147server in some way. The administrators may delegate these
1148capabilities to trusted groups of users.
1149
1150Delegation of capabilities allows groups to be granted a subset of
1151administrative capabilities without being given complete
1152administrative control of the server. This makes it possible to
1153keep fewer users in the administrators group, even while spreading
1154much of the server administration burden out to more users.
1155
David Pursehouse8becc2a2013-04-23 18:51:04 +09001156Global capabilities are assigned to groups in the access rights settings
1157of the root project ("`All-Projects`").
1158
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001159Below you find a list of capabilities available:
1160
1161
David Pursehouse11c4c5f2013-06-09 08:07:23 +09001162[[capability_accessDatabase]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001163=== Access Database
David Pursehouse11c4c5f2013-06-09 08:07:23 +09001164
Dave Borowitzd9b8b392014-09-11 13:49:54 +02001165Allow users to access the database using the `gsql` command, and view code
1166review metadata refs in repositories.
David Pursehouse11c4c5f2013-06-09 08:07:23 +09001167
1168
Fredrik Luthander426885f2012-02-13 09:56:57 +01001169[[capability_administrateServer]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001170=== Administrate Server
Fredrik Luthander426885f2012-02-13 09:56:57 +01001171
1172This is in effect the owner and administrator role of the Gerrit
1173instance. Any members of a group granted this capability will be
1174able to grant any access right to any group. They will also have all
1175capabilities granted to them automatically.
1176
1177
Bruce Zu4512fe62014-11-18 17:39:41 +08001178[[capability_batchChangesLimit]]
1179=== Batch Changes Limit
1180
1181Allow site administrators to configure the batch changes limit for
1182users to override the system config
1183link:config-gerrit.html#receive.maxBatchChanges['receive.maxBatchChanges'].
1184
1185Administrators can add a global block to `All-Projects` with group(s)
1186that should have different limits.
1187
1188When applying a batch changes limit to a user the largest value
1189granted by any of their groups is used. 0 means no limit.
1190
1191
Fredrik Luthanderb02afca2012-02-13 09:59:48 +01001192[[capability_createAccount]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001193=== Create Account
Fredrik Luthanderb02afca2012-02-13 09:59:48 +01001194
Fredrik Luthander79d38152012-03-13 09:52:22 +01001195Allow link:cmd-create-account.html[account creation over the ssh prompt].
Fredrik Luthanderb02afca2012-02-13 09:59:48 +01001196This capability allows the granted group members to create non-interactive
1197service accounts. These service accounts are generally used for automation
1198and made to be members of the
1199link:access-control.html#non-interactive_users['Non-Interactive users'] group.
1200
1201
Fredrik Luthander79d38152012-03-13 09:52:22 +01001202[[capability_createGroup]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001203=== Create Group
Fredrik Luthander79d38152012-03-13 09:52:22 +01001204
1205Allow group creation. Groups are used to grant users access to different
1206actions in projects. This capability allows the granted group members to
1207either link:cmd-create-group.html[create new groups via ssh] or via the web UI.
1208
1209
1210[[capability_createProject]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001211=== Create Project
Fredrik Luthander79d38152012-03-13 09:52:22 +01001212
1213Allow project creation. This capability allows the granted group to
1214either link:cmd-create-project.html[create new git projects via ssh]
1215or via the web UI.
1216
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001217
Sasa Zivkov812f4892012-06-21 16:25:21 +02001218[[capability_emailReviewers]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001219=== Email Reviewers
Sasa Zivkov812f4892012-06-21 16:25:21 +02001220
1221Allow or deny sending email to change reviewers and watchers. This can be used
1222to deny build bots from emailing reviewers and people who watch the change.
1223Instead, only the authors of the change and those who starred it will be
1224emailed. The allow rules are evaluated before deny rules, however the default
1225is to allow emailing, if no explicit rule is matched.
Fredrik Luthander79d38152012-03-13 09:52:22 +01001226
Fredrik Luthandera8aa9c52013-05-09 14:50:39 +02001227
Fredrik Luthander74ad0d02012-03-13 13:06:30 +01001228[[capability_flushCaches]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001229=== Flush Caches
Fredrik Luthander74ad0d02012-03-13 13:06:30 +01001230
Fredrik Luthander48603002012-03-21 18:17:17 +01001231Allow the flushing of Gerrit's caches. This capability allows the granted
Fredrik Luthander74ad0d02012-03-13 13:06:30 +01001232group to link:cmd-flush-caches.html[flush some or all Gerrit caches via ssh].
1233
1234[NOTE]
1235This capability doesn't imply permissions to the show-caches command. For that
1236you need the <<capability_viewCaches,view caches capability>>.
1237
1238
Fredrik Luthander46843022012-03-13 16:11:02 +01001239[[capability_kill]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001240=== Kill Task
Fredrik Luthander46843022012-03-13 16:11:02 +01001241
1242Allow the operation of the link:cmd-kill.html[kill command over ssh]. The
1243kill command ends tasks that currently occupy the Gerrit server, usually
1244a replication task or a user initiated task such as an upload-pack or
Gustaf Lundha28a1d22013-05-08 15:05:12 +01001245receive-pack.
Fredrik Luthander46843022012-03-13 16:11:02 +01001246
David Ostrovskyaa49e272014-07-22 00:55:47 +02001247[[capability_modifyAccount]]
1248=== Modify Account
1249
1250Allow to link:cmd-set-account.html[modify accounts over the ssh prompt].
1251This capability allows the granted group members to modify any user account
1252setting.
Fredrik Luthander46843022012-03-13 16:11:02 +01001253
1254[[capability_priority]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001255=== Priority
Fredrik Luthander46843022012-03-13 16:11:02 +01001256
1257This capability allows users to use
1258link:config-gerrit.html#sshd.batchThreads[the thread pool reserved] for
1259link:access-control.html#non-interactive_users['Non-Interactive Users'].
1260It's a binary value in that granted users either have access to the thread
1261pool, or they don't.
1262
1263There are three modes for this capability and they're listed by rising
1264priority:
1265
1266No capability configured.::
1267The user isn't a member of a group with any priority capability granted. By
1268default the user is then in the 'INTERACTIVE' thread pool.
1269
1270'BATCH'::
1271If there's a thread pool configured for 'Non-Interactive Users' and a user is
1272granted the priority capability with the 'BATCH' mode selected, the user ends
1273up in the separate batch user thread pool. This is true unless the user is
1274also granted the below 'INTERACTIVE' option.
1275
1276'INTERACTIVE'::
1277If a user is granted the priority capability with the 'INTERACTIVE' option,
1278regardless if they also have the 'BATCH' option or not, they are in the
1279'INTERACTIVE' thread pool.
1280
1281
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001282[[capability_queryLimit]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001283=== Query Limit
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001284
1285Allow site administrators to configure the query limit for users to
1286be above the default hard-coded value of 500. Administrators can add
David Pursehouseb5d99aaf2013-08-09 11:02:48 +09001287a global block to `All-Projects` with group(s) that should have different
1288limits.
Fredrik Luthander80ebf9d2012-02-13 09:32:43 +01001289
1290When applying a query limit to a user the largest value granted by
1291any of their groups is used.
1292
1293This limit applies not only to the link:cmd-query.html[`gerrit query`]
1294command, but also to the web UI results pagination size.
1295
1296
Shawn Pearcebb027b02013-06-10 14:35:39 -07001297[[capability_runAs]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001298=== Run As
Shawn Pearcebb027b02013-06-10 14:35:39 -07001299
Shawn Pearcef3ffd082013-06-12 11:21:35 -07001300Allow users to impersonate any other user with the `X-Gerrit-RunAs`
1301HTTP header on REST API calls, or the link:cmd-suexec.html[suexec]
1302SSH command.
1303
1304When impersonating an administrator the Administrate Server capability
1305is not honored. This security feature tries to prevent a role with
1306Run As capability from modifying the access controls in All-Projects,
1307however modification may still be possible if the impersonated user
1308has permission to push or submit changes on `refs/meta/config`. Run
1309As also blocks using most capabilities including Create User, Run
1310Garbage Collection, etc., unless the capability is also explicitly
1311granted to a group the administrator is a member of.
1312
1313Administrators do not automatically inherit this capability; it must
1314be explicitly granted.
Shawn Pearcebb027b02013-06-10 14:35:39 -07001315
1316
Edwin Kempin619169b2012-02-09 15:47:52 +01001317[[capability_runGC]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001318=== Run Garbage Collection
Edwin Kempin619169b2012-02-09 15:47:52 +01001319
1320Allow users to run the Git garbage collection for the repositories of
1321all projects.
1322
1323
Ed Bartoshd168b812013-04-13 20:15:58 +03001324[[capability_streamEvents]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001325=== Stream Events
Ed Bartoshd168b812013-04-13 20:15:58 +03001326
1327Allow performing streaming of Gerrit events. This capability
1328allows the granted group to
1329link:cmd-stream-events.html[stream Gerrit events via ssh].
1330
1331
Dave Borowitzf3548a92014-02-20 11:02:19 -08001332[[capability_viewAllAccounts]]
1333=== View All Accounts
1334
1335Allow viewing all accounts for purposes of auto-completion, regardless
1336of link:config-gerrit.html#accounts.visibility[accounts.visibility]
1337setting.
1338
1339
Fredrik Luthander9c7da662012-03-13 17:49:27 +01001340[[capability_viewCaches]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001341=== View Caches
Fredrik Luthander9c7da662012-03-13 17:49:27 +01001342
Fredrik Luthander48603002012-03-21 18:17:17 +01001343Allow querying for status of Gerrit's internal caches. This capability allows
Fredrik Luthander9c7da662012-03-13 17:49:27 +01001344the granted group to
1345link:cmd-show-caches.html[look at some or all Gerrit caches via ssh].
1346
1347
Fredrik Luthander48603002012-03-21 18:17:17 +01001348[[capability_viewConnections]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001349=== View Connections
Fredrik Luthander48603002012-03-21 18:17:17 +01001350
1351Allow querying for status of Gerrit's current client connections. This
1352capability allows the granted group to
1353link:cmd-show-connections.html[look at Gerrit's current connections via ssh].
1354
1355
Edwin Kempin362b14d12014-05-09 14:18:12 +02001356[[capability_viewPlugins]]
1357=== View Plugins
1358
1359Allow viewing the list of installed plugins.
1360
1361
Fredrik Luthander48603002012-03-21 18:17:17 +01001362[[capability_viewQueue]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001363=== View Queue
Fredrik Luthander48603002012-03-21 18:17:17 +01001364
1365Allow querying for status of Gerrit's internal task queue. This capability
1366allows the granted group to
1367link:cmd-show-queue.html[look at the Gerrit task queue via ssh].
1368
1369
Shawn O. Pearce5500e692009-05-28 15:55:01 -07001370GERRIT
1371------
1372Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07001373
1374SEARCHBOX
1375---------