Change screen: Make change owner votes removable

When change owner votes on change and disappears (yeah, that happens
very often: people suddenly disappear) it isn't possible any more to
remove her vote.

Old change screen had this feature as well.

Bug: issue 2909
Change-Id: I7cdbbc5faa2fa6eb68fd42c91ad2181e98bdc2fd
Add InitStep to fix wrong primary key column order

For 2.9 and 2.10 we cannot perform this fix as a database
migration as we cannot increase the schema version. Therefore, do the
primary key fix in an InitStep for 2.9 and 2.10. In the master the
primary key fix will be done as a normal schema migration and the
InitStep introduced here will be deleted.

Change-Id: I4478aabcd63f907a1acfc8e23982bcc6f1c4346f
Don't use deprecated PGPPublicKeyRingCollection constructor

The PGPPublicKeyRingCollection constructor was deprecated in
Bouncycastle v1.51.

Use BcPGPPublicKeyRingCollection instead.

Change-Id: I5bc4fb4927ba37ecbf7d3763809acc2f53d7fd4e
(cherry picked from commit d26e43f22f2336efd18213ac88c285f8b95827cd)
Add init step that creates initial admin user for developer system

The new init step automatically creates the first administration user
if development_become_any_account is chosen as auth type. This allows
to fully script the setup of a test system.

Change-Id: Id3b78218306c8d29116905226850d96a421e5440
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Do not throw away random bytes from the CSPRNG

The older code generated LEN bytes of cryptography-safe random data
and applied the base64 encoding on top of that. The base64
transformation, however, inflates the size of the data by 33%, and
this means that only 9 bytes of randomness were actually used.

Unless the goal was to discard some of the CSPRNG output to make sure
that we do not leak too much stuff to a possible attacker, of course
("attacker" == "user generating passwords"). If that is the case, let
me know and I'll send a patch clarifying that this is by design.

Change-Id: Ie90ccc8012b3f6b9f80b74b879b713bc6959a874
Increase the size of HTTP passwords

These passwords are generated on the server side, and a regular user
has no way of increasing their length unless they ask an admin which
is actually capable of setting them as an arbitrary string. The
default length of just 12 characters might not be that much by today's
standards. Password storage is cheap, and 31 random bytes mean 42
characters as a result, which is of course THE number to use.

Change-Id: If70bf233aeb34bce46aa5a7d56f3bd64e0d108f3
Fix incorrect formatting in json documentation

Change-Id: Idaf47978ddd09c9f7a5708efb7d70afcfb8899f8
Add CSS style name on review comment div

Having style names on the elements makes it easy to apply custom
themes.

The DIV element containing the review comment was the only one
that did not have a name.

Bug: Issue 2998
Change-Id: I028c3bf4c4067ef31b10b364f85a456750876d56
Consider rule action while constructing local owners list

Previously rule action was not considered during computation of local
owners list in ProjectState. This means that members of group that was
added to OWNER permission with BLOCK or DENY action were considered as
project owners.

This patch fixes this security breach. Now groups assigned to OWNER
permission with BLOCK or DENY action will not be recognized as owners

Change-Id: I048f52d7b23b55c9e8843c5b2c9907b3326c8d40
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Fix NullPointerException in Reindex

Reindex was loading the AccessControlModule which is loading the
GitUploadPackGroupsProvider and the GitReceivePackGroupsProvider. Those
2 classes need the CurrentUser in order to determine if he can see the
configured groups if those are not visible to all the users. Reindex
binds the CurrentUser to null which was causing the
NullPointerException if upload of receive groups were configured in
gerrit.config.

Instead of binding the CurrentUser to the InternalUser class which
would have fixed the issue, bind the GitUploadPackGroups and
GitReceivePackGroups to empty sets. The reason to use the second option
is because the providers of GitUploadPackGroups and GitReceivePackGroups
will require to load groups information from the GroupBackend which can
take time and is not required by the Reindex.

Issue: 3025
Change-Id: I78d7bb93195aefb82ebec421237147db2f7e4b3d
Merge "Add InitStep to fix wrong primary key column order" into stable-2.9
Merge branch 'stable-2.9' into stable-2.10

* stable-2.9:
  Add CSS style name on review comment div
  Fix incorrect formatting in json documentation
  Don't use deprecated PGPPublicKeyRingCollection constructor
  Add InitStep to fix wrong primary key column order

Change-Id: Id89fc4ec6684396ce13acb57f925fcff53f6b06e
Update 2.10 release notes with information from 2.9.2

Mention that 2.10 includes the fixes that were done in 2.9.2.

Add a warning about database table primary key update during
site init.

Change-Id: I1a517b338d223b922de8f2b45b2e37a0b2891d28
Tidy up global capability definitions

Move MODIFY_ACCOUNT to correct alphabetical order.

Rename DEFAULT_MAX_BATCH_CHANGES to DEFAULT_MAX_BATCH_CHANGES_LIMIT,
and move it up so it's right after BATCH_CHANGES_LIMIT. This makes it
consistent with the way DEFAULT_MAX_QUERY_LIMIT is defined.

Change-Id: Ie71a7a5886f95a50e9dae25ba16b3717e2ce27a7
Fix granting of capabilities in capabilities acceptance test

Do not grant ADMINISTRATE_SERVER and PRIORITY for User.

Set the default ranges for range permissions.

Change-Id: I5e653bfc288d62a0f342b06af28eabeaa45c9b43
Fix capabilities acceptance test broken by batch changes limit

This was missed before in Ic929dc4 and the acceptance tests are
currently broken:
  FAILURE testCapabilitiesUser: batchChangesLimit
  java.lang.NoSuchFieldException: batchChangesLimit

Add handling of the batch changes limit field in the acceptance
test.

Change-Id: I486864594cbccaaf0a6f14f14c0b5bc7107e580d
Merge branch 'stable-2.10'

* stable-2.10:
  Update 2.10 release notes with information from 2.9.2
  Fix NullPointerException in Reindex
  Add CSS style name on review comment div
  Fix incorrect formatting in json documentation
  Don't use deprecated PGPPublicKeyRingCollection constructor
  Add InitStep to fix wrong primary key column order

This reverts commit 12b44cb3904ee982c47a8cfbf3499f0f174c67b6
(Add InitStep to fix wrong primary key column order) which is not
needed on master.

This reworks commit db88d1539931ba28b8a9f7e44274b9efeb2ac51f
(Fix NullPointerException in Reindex) due to injection setup for
the reindex being changed between stable-2.10 and master.

Conflicts:
	gerrit-pgm/src/main/java/com/google/gerrit/pgm/Reindex.java

Change-Id: I2061bd2265a7117f1a978c68ac692fe2f09b1884
Merge "Consider rule action while constructing local owners list" into stable-2.9
ChangeScreen2: Make Reply button configurable

There were several complaints on Google Groups and in the issue tracker
about the Reply… button in the New Change Screen. People new to
Gerrit/the New Change Screen didn't know where to click in order to
submit a review.

Add a setting in gerrit.config, where the administrator can customize
the label and tooltip of the Reply… button.

Bug: issue 2541
Bug: issue 2974
Change-Id: Ib9e95aa2f03debc88ea091c4d3fb91c83ad9d1ba
Update system group documentation

Administrators and batch users are not system groups any more, and
the identity of system groups cannot be set in `system_config`.

Change-Id: I1ec4d3e316115a669362d670f6e1eb7107aa2848