3885 Commits

Author SHA1 Message Date
David Pursehouse
5b2f0d4b4e Merge branch 'stable-2.15'
* stable-2.15:
  BranchApi: Add missing throws declaration on NotImplemented#reflog
  FormatUtil: Fix Math#round() truncation error flagged by error-prone
  ReflogIT: Add test coverage for reflog permissions
  ChangeIT: Move reflog test to ReflogIT
  ChangeIT: Fix and expand reflog test
  BranchApi: Add method to get the branch's reflog
  GetReflog: Move ReflogEntryInfo to a separate class in extension API
  Fix http_archive rule in WORKSPACE
  ConfigInfoImpl: Return raw byte value for effective value
  TransferConfig: Move getEffectiveMaxObjectSizeLimit to ProjectState
  ProjectIT: Factor out a method to set the max object size limit
  Documentation: linux-quickstart - include Java 8 requirement
  Documentation: Include Java 8 requirement in installation notes
  Documentation: Remove 'install-quick' page in favour of 'linux-quickstart'

Change-Id: I895790a8b2f9e8439e91c15ba4ee9a5a14a4ee94
2018-08-22 21:59:06 +09:00
David Pursehouse
4c6fd983e4 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  BranchApi: Add missing throws declaration on NotImplemented#reflog
  FormatUtil: Fix Math#round() truncation error flagged by error-prone
  ReflogIT: Add test coverage for reflog permissions
  ChangeIT: Move reflog test to ReflogIT
  ChangeIT: Fix and expand reflog test
  BranchApi: Add method to get the branch's reflog
  GetReflog: Move ReflogEntryInfo to a separate class in extension API

Change-Id: I209a4450771ebb640e6997e11d24d699ba20a033
2018-08-22 15:53:39 +09:00
David Ostrovsky
2a107d74a1 FormatUtil: Fix Math#round() truncation error flagged by error-prone
Building with Bazel@HEAD: [1] is failing with this error message:

  FormatUtil.java:129: error: [MathRoundIntLong] Math.round(Integer) results in truncation
  | int p = Math.abs(Math.round(delta * 100 / size));
  | ^
  | (see https://errorprone.info/bugpattern/MathRoundIntLong)
  | Did you mean 'int p = Math.abs(Ints.saturatedCast(delta * 100 / size));'?

To rectify, replace Math.round() with Ints.saturatedCast() and borrow
this method from Guava library because Guava cannot be currently used in
GWT client code.

[1] https://github.com/bazelbuild/bazel/issues/5944
Change-Id: I1c88102d4d027796594fb7cdcde4f0ec4921d4ad
2018-08-22 07:42:37 +02:00
David Pursehouse
0d06b081bb Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Fix http_archive rule in WORKSPACE
  ConfigInfoImpl: Return raw byte value for effective value
  TransferConfig: Move getEffectiveMaxObjectSizeLimit to ProjectState

Change-Id: Ib58995f7f6db32e2585c285b3d3dceb6b358848f
2018-08-21 14:05:58 +09:00
David Pursehouse
33f544a075 ConfigInfoImpl: Return raw byte value for effective value
The 'value' field of the info shows the effective value that gets
applied. Set it as the actual byte value rather than the formatted
value which could be using any arbitrary unit suffix (within the
scope of the suffixes actually supported).

In the UI, always show the effective value, rather than only when
there is a global value, and explicitly say when there is no value
configured.

Note that the UI changes are only in GWT because the project info
screen is not implemented for Polygerrit on this branch. The same
changes can be applied to Polygerrit in a follow-up commit after
this has been merged up to stable-2.15/master.

Change-Id: Ibb88d734e6a322ee90f66d1b4c4a3882d2e0654a
2018-08-20 17:36:35 +09:00
David Pursehouse
3ceb50d2e7 Merge branch 'stable-2.15'
* stable-2.15:
  ChangeIT: Move reflog test to ReflogIT
  ReflogIT: Move to com.google.gerrit.acceptance.server.project
  ReflogIT: Remove unneeded setUp method
  ChangeIT: Fix and expand reflog test
  ProjectState: Remove unnecessary 'final' modifiers from constructor
  ConfigInfo: Annotate MaxObjectSizeLimitInfo fields as nullable
  ConfigInfo: Add Javadoc for MaxObjectSizeLimitInfo fields
  Upgrade JGit to v4.5.4.201711221230-r
  Fix deprecation warnings from latest JGit update
  Upgrade JGit to 4.3.0.201604071810-r
  Set version to 2.12.9-SNAPSHOT
  Buck: Fix typo in gerrit_plugin.bucklet
  Remove min width from autocomplete container
  ConfigInfoImpl: Factor out initialization of MaxObjectSizeLimitInfo to a method
  Rename instances of TransferConfig to transferConfig
  Clarify inherited_value in documentation of MaxObjectSizeLimitInfo
  Reword docmentation of project specific object size limit for clarity
  PutConfig: Reload project config before returning response
  Fix partially hidden plugin configuration in the UI
  Upgrade PostgreSQL JDBC driver
  SiteProgram: Extract local variable
  SiteProgram: Extract constant
  SiteProgram: Inline variable to avoid hiding field
  DataSourceProvider: Rename local variable to avoid hiding field
  DataSourceProvider: Remove unneeded finals
  DataSourceProvider: Replace inner class with lambda
  DataSourceProvider: Extract constant
  Add current patchset to json when a review is public/ready
  Migrate `tools/bazel.rc` to `.bazelrc`
  ProjectIT: Add tests for maxObjectSize configuration
  EventRecorder: Add assertNoRefUpdatedEvents helper method
  ProjectIT: Rename 'config' method to 'submitType'

Change-Id: I83eee5496f538daff37c936dcb1cc19f13b27705
2018-08-20 08:41:36 +09:00
David Pursehouse
41d902c39f Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Fix partially hidden plugin configuration in the UI
  Upgrade PostgreSQL JDBC driver

Change-Id: If39e7b17462979c21eb00085b81a2c4b5953652b
2018-08-08 21:40:49 +01:00
Hugo Arès
86659c1a50 Fix partially hidden plugin configuration in the UI
In project setting page, plugin configurations were partially hidden if
value had more characters than the default number of characters
displayed in the text box.

For users who can edit the configurations, this is not an issue as they
can see the hidden part by moving the cursor in the text box. Users
which cannot edit the configurations, the field is disabled preventing
them to see the hidden part.

Fix it by making the text box wider if needed. This fix is not ideal
because if the value is really long, then the text box could be wider
than the screen size causing an horizontal scroll bar to appear.

An other option would have been to set the attribute "readonly" instead
of "disabled" which would allow users with no edit rights to see the
hidden part by putting the cursor in the text box. The problem is not
all the input controls used in the project page support setting the
readonly attribute so the code change would be more complex and
intrusive.

Since GWT UI is going away, go with the more simple and less intrusive
solution which is to make the text area wider when needed.

Change-Id: I189e9482cc03043819cb0077f6ea10d3585edb9d
2018-08-07 14:43:27 -04:00
David Pursehouse
c67d123107 Merge branch 'stable-2.15'
* stable-2.15:
  Follow up to: "Add new "Delete Changes" permission"

Change-Id: I2c3520f534ac4bab7405de033d7304672dac7393
2018-07-19 11:23:15 +09:00
David Pursehouse
d31f49299a Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Follow up to: "Add new "Delete Changes" permission"

Change-Id: Id35556ad7a8dd8287b92b080cff8330ba4db8c4f
2018-07-19 10:14:00 +09:00
Jacek Centkowski
13301df25c Follow up to: "Add new "Delete Changes" permission"
Add "Delete Changes" permission to constants so that it is displayed
properly in GWT UI.

Change-Id: I8b71afa8ed1507b3ca6f8ae1a5c48575c2477281
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
2018-07-18 14:15:21 +02:00
David Pursehouse
4610fcad4e Merge branch 'stable-2.15'
* stable-2.15:
  Polygerrit: Always create new changes as WIP
  ElasticIndexIT: replace member with local variable
  Elasticsearch tests: remove password duplication
  Fix call to the fail skylark global in junit.bzl
  Set version to 2.14.11-SNAPSHOT
  Set version to 2.14.10
  AbstractQueryChangesTest: Add byMessageSubstring test
  AbstractQueryChangesTest: Expand byTopic with more 'intopic' tests
  Elasticsearch: Add char analyzer to ensure consistency of query results
  Elasticsearch: remove overridden build assignment
  Elasticsearch: run no other test at the same time
  ElasticVersionTest: run it through bazel as well
  Elasticsearch: cover V5 and flaky V6 tests -for CI
  Split Elasticsearch query tests into separate rules
  dev-contributing: Document that we format .bzl files with buildifier
  Add account setting for defaulting new changes to WIP
  Add project setting for defaulting new changes to WIP
  Apply buildifier to .bzl files.
  Update Bower to 1.8.2
  Bump commons-io version to 2.2
  Add missing elasticsearch dependency in pgm tests
  Highlight.js: style gr-syntax-name as gr-syntax-keyword
  Elasticsearch: remove unnecessary test build deps
  Clarify behavior of "Ignore" feature in REST API documentation
  Expose commons-compress in plugin API
  Bump commons-io version to 2.2

Change-Id: I99edb118d193ebe9150f89a902a1407e69711cfc
2018-07-17 13:08:37 +09:00
Alice Kober-Sotzek
8dfc226eda Remove workaround regarding newlines on GWT UI
The GWT UI always appended a newline character to the diff content it
received from the server, no matter whether the file contained a
newline at the end or not. Since the server now sends an empty string
if there is a newline at the end, we don't need the workaround anymore.

Change-Id: I0da144366d3245e88e4e5529828ac1f900f46fd3
2018-07-11 17:26:42 +02:00
David Ostrovsky
821c5321d2 Add account setting for defaulting new changes to WIP
Create change online dialog wasn't extended in this change to respect
new added work-in-progress account setting to initialize the checkbox
accordingly. In PolyGerrit UI the WIP Change checkbox is shown and could
be set if needed, in GWT UI the work-in-progress flag is always set
implicitly.

Feature: Issue 8866
Change-Id: Ibf537436841b755c946a6c329100f94a22774f68
2018-07-10 23:42:20 +00:00
David Ostrovsky
9690994111 Add project setting for defaulting new changes to WIP
Feature: Issue 8866
Change-Id: I67b144eb3edfb596cfcfb545b273599d82cc04b1
2018-07-10 23:23:49 +02:00
Edwin Kempin
f3c75eae24 AccessSection.getPermissions: Return defensive copy of list
If AccessSection directly returns its modifyable list, callers can
modify the list outside of AccessSection. This is bad because this way
it is possible to violate assumptions of the AccessSection class. E.g.
AccessSection makes sure that the permission list cannot contain
duplicate permissions. Having duplicate permissions in the permission
list can lead to severe problems. E.g. duplicate permissions on an
access section of the All-Projects project make the permissions of the
All-Project project unreadable and Gerrit effectively stops working.
This is because ProjectState#getLocalAccessSections() filters out some
permissions on the All-Projects project by getting the list of
permissions from AccessSection and setting the filtered list back on
AccessSection. If the list that was retrieved from AccessSection
contained duplicate permissions, setting back the list failed with
IllegalArgumentException since
AccessSection#setPermissions(List<Permission>) doesn't allow duplicate
permissions.

A similar issue was already fixed by change I5222cd9174 and change
Ief24c6e82f.

Ideally we would return an ImmutableList from
AccessSection.getPermissions() but we cannot use ImmutableList in
classes that are used by the GWT UI.

Change-Id: I61f0baf6deb5c4ba1b609aacaabeb1f149f444d9
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-07-06 09:51:43 +02:00
David Pursehouse
c2b58731ba Merge branch 'stable-2.15'
* stable-2.15:
  ChangeScreen: Do not show "Cannot Merge" for WIP changes

Change-Id: I8eca6e922fac3941cab136b8e4ce7e1ff3534c48
2018-06-25 13:11:02 +09:00
Orgad Shaneh
42a7e65890 ChangeScreen: Do not show "Cannot Merge" for WIP changes
It is confusing, and has an even more confusing tooltip:
The change cannot be merged due to a path conflict...

Change-Id: I238753fa93166ff95283f283b1c52342229391c1
2018-06-20 10:08:07 +03:00
Paladox none
8d2dc78546 Merge "Make PolyGerrit the default UI" 2018-06-15 11:54:10 +00:00
David Pursehouse
adba024a9f Merge branch 'stable-2.15'
* stable-2.15:
  Add optional dir_name argument to gerrit_plugin
  Format WORKSPACE and BUILD files with buildifier version 0.12.0
  Move commons-io from lib/BUILD to lib/commons/BUILD

Change-Id: I63bf9cec7e81f3f0f7ef88addf99e544bc1d7479
2018-06-14 18:26:01 +09:00
David Pursehouse
e31b257f3f Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Format WORKSPACE and BUILD files with buildifier version 0.12.0
  Move commons-io from lib/BUILD to lib/commons/BUILD

Change-Id: I6130353f0cceed80b370e5566d329acd7e0829b3
2018-06-14 16:55:29 +09:00
David Pursehouse
fd0fcb2422 Format WORKSPACE and BUILD files with buildifier version 0.12.0
Change-Id: I6d5d4f34ba2317b82547f5dde5d0ef69d69cfce7
2018-06-14 15:34:39 +09:00
Paladox none
b8da4ff335 Make PolyGerrit the default UI
Turn PolyGerrit UI status from experimental to default UI. Remove the
option to disable PolyGerrit UI. This is the next step toward removing
of GWT UI.

We keep gerrit.enableGwtUi option, so that gerrit site administrators can
remove GWT UI and make PolyGerrit the only supported UI already now and
not wait until GWT UI is removed in upcoming releases.

Change-Id: Ie5c658488962911c3a113b08ce1768858f12db07
2018-06-13 07:45:45 +00:00
David Pursehouse
7a88969052 Merge branch 'stable-2.15'
* stable-2.15:
  AbstractQueryChangesTest: Add byMessageMixedCase test
  ElasticContainer: replace the deprecated override
  ElasticVersion: remove redundant private modifier
  ElasticIndexVersionManager: remove unneeded type
  Elasticsearch: make package-private usage explicit
  MyPasswordScreen: Fix default text in password field
  Move: Return the modified change in JSON response
  Elasticsearch: fix changes index type for bulk calls
  RevisionIT: Add test for posting review comment on non-existing file
  PostReview: Use correct patch set ID to reject comment on non-existing file
  Don't fail on removing star labels from change without star labels
  AbstractQueryAccountsTest: Add byDeletedAccount to ensure consistency
  AbstractQueryGroupsTest: Add byDeletedGroup to achieve higher coverage
  Elastic{Account,Group}Index: Move the static Logger right after class
  Elastic{Account,Change,Group}Index: Make names/types explicitly private
  {Account,Change,Group}Mapping: Set package-privacy
  Docs intro-gerrit-walkthrough: Rewrite for v2.15 PG UI
  Add integration test classes for "ssh index" commands
  ActionJson: Add workInProgress to ChangeInfo copy method
  Allow to toggle ready flag by project owners
  Allow to toggle WIP flag by project owners
  Upgrade JGit to 4.9.2.201712150930-r.15-g5fe8e31d4
  Bazel: Harmonize names of external repositories

The changes done in I4598a6fb9 ("Allow to toggle ready flag by project
owners") and I259a170ed ("Allow to toggle WIP flag by project owners") are
adjusted to replace usage of ProjectControl with PermissionBackend.

Change-Id: I82443ea0e4f2d5a3db2169bbbe129a10520adc0a
2018-06-13 16:20:48 +09:00
David Pursehouse
4e3b480c35 Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  MyPasswordScreen: Fix default text in password field

Change-Id: I98cf0ce7fda9af11193d56ffe78534781cd4804b
2018-06-12 19:41:08 +09:00
David Pursehouse
32b6adfade MyPasswordScreen: Fix default text in password field
The default text says:

  "click 'generate' to revoke an old password"

but the label on the button is actually 'Generate Password'.

Change the text to be consistent with the label. At the same time,
move the text into the AccountConstants class.

Change-Id: I2220103237c71d653f62fbf76ea866604f195d65
2018-06-12 17:10:41 +09:00
Dave Borowitz
94fd307693 Move Truth rules to a subdirectory of lib
The list of supported Truth extensions is only going to grow.

Change-Id: Ic67a9df6a7548d964fc10b13c10b6db1c96e514e
2018-05-16 14:20:06 -07:00
David Pursehouse
3650cb9f56 Merge branch 'stable-2.15'
* stable-2.15:
  gr-change-metadata: Change "Hashtag" label to "Hashtags"
  ChangeScreen: Add missing 'Hashtags' label
  WorkQueue: Make defaultQueueSize final

Change-Id: I6b55a11f4b4cfffa66f4e044be325c3c8e81622b
2018-05-07 16:51:51 +09:00
David Pursehouse
669bed5f01 ChangeScreen: Add missing 'Hashtags' label
Bug: Issue 8936
Change-Id: Iae30c1128546b52c98fa516906722d5de796eac2
2018-05-07 10:33:16 +09:00
David Pursehouse
f609340ec1 Merge branch 'stable-2.15'
* stable-2.15:
  Change "WorkInProgress" to "Work in Progress"
  ChangeTable: Show "Work in Progress" in status column
  ChangeScreen: Don't show "Merge Conflict" for submittable WIP change

Change-Id: I17aebee341f16b25167620a526f6daa3653a23d4
2018-04-25 13:34:47 +09:00
David Pursehouse
217fab6ab1 Change "WorkInProgress" to "Work in Progress"
Change-Id: Ie79864f6df3de9201455551878e225df328be4ae
2018-04-25 12:53:18 +09:00
David Pursehouse
09db14a3e7 ChangeTable: Show "Work in Progress" in status column
When a change is in WIP state it was not shown in the status column.

Furthermore, when a WIP change had all the necessary labels to allow
submit, its status was shown as "Merge Conflict".

Bug: Issue 8643
Change-Id: I6a063cc84d306d9471617ff365d2aa06046b59c2
2018-04-25 12:33:04 +09:00
David Pursehouse
41703dc9ff ChangeScreen: Don't show "Merge Conflict" for submittable WIP change
If a change had all the necessary labels to allow submit, but is still
in the WIP state, the status showed as "Merge Conflict (WorkInProgress")
on the change screen.

The reason is that the "mergeable" flag is not set in the change info
when a change is WIP.

Add a condition to prevent setting "Merge Conflict" if a change is WIP.

Now it says: "Review in Progress (WorkInProgress)".

Bug: Issue 8643
Change-Id: Ia2960e8824e8d6f975adb545a73dd2a7accf0469
2018-04-25 12:33:04 +09:00
Dave Borowitz
aa91227531 Revert "Create Review Permission"
The migration was broken; see 942a8fe8 for further rationale.

Also fixes the tests that depended on this new feature:
https://gerrit-review.googlesource.com/c/gerrit/+/171871/2..3/javatests/com/google/gerrit/acceptance/git/PushPermissionsIT.java

This reverts commit 97afc05387137e73c1af3f9565985f4c584cacc3.

Change-Id: I450b50b57f06ddabefc3c08cd2680ff7023ca0fd
2018-04-24 15:00:15 -04:00
Dave Borowitz
942a8fe8cf Revert migration from refs/for/* permissions to refs/heads/*
The migration contains a bug which causes project.config to become
unreadable, breaking a site until it is fixed. A fix is in progress[1],
but there are still some open questions that we don't have answers to.
Revert the functionality for now, to give us time to fully bake a fix.

This reverts the following commits:
  9ff07177eae4970c1773682cbfc503b329b93e78
  8392e982c0fc0f2a73397fab18a381cec050514f
  66c52dae95e16c1bcce9dad4ae91bfc6c0dc04ab
  642f3e07e7cb98a997e15569ae01a6952a9bce67

[1] https://gerrit-review.googlesource.com/c/gerrit/+/173513

Change-Id: I139ba7aa97a946f2c31258e7dfaa3a94ee72ff6e
2018-04-24 11:59:42 -04:00
Gustaf Lundh
642f3e07e7 "Submit on Push" option on Submit Perm.
Add "Submit on Push" option to the Submit Permission and remove
the "refs/for/"-way of allowing this.

This change introduces a "Submit on Push" option for the Submit
permission, which will enable the %submit push parameter.

Any "submit refs/for/*" permission will be  automatially migrated
when the config is loaded.

Change-Id: I6106ecf289bef541fa273d3deebead7a3a9710ac
2018-04-20 10:40:00 +02:00
Gustaf Lundh
97afc05387 Create Review Permission
This is the first change in a series that intends to getting rid of
refs/for/ from ACLs.

The migration from "push refs/for/*" to "create-review refs/heads/*"
is handled on-the-fly when the configuration is loaded.

Any "push refs/for/*" permission will be  automatially migrated to the
new "Create Review" permission and the old permission will be removed
if possible (e.g. push refs/* will create a new Create Review permission,
but keep the old permission since it will affect refs/{heads,meta}/*).

When the rest of the refs/for/ dependent permissions are migrated, an
offline schema migration should be available to help correct all configs,
though the online auto migration should be available for a few major
versions to help fix ACL-mistakes by users.

Change-Id: Ia112adeb7593a7b4a7a8b5d8b96f72f73c9b70b8
2018-04-19 13:13:54 +02:00
David Pursehouse
4ec5ef6bd2 Upgrade to google-java-format 1.5
Change-Id: I8e0270efad021e69b1a127cf3175626d26381bdb
2018-04-18 09:06:49 +02:00
Edwin Kempin
5cb9186480 AccountGroupAuditLogScreen: Display group UUID if group name is missing
The group name is missing if there is no group backend that can resolve
the UUID. This can e.g. happen if the singleusergroup was used and
single user groups have been added to Gerrit groups, but then the
singleusergroup plugin was uninstalled so that the single user groups
can no longer be resolved.

Change-Id: I1bccec4bb38b55f6ad9b2d2ac83227b379d09071
Signed-off-by: Edwin Kempin <ekempin@google.com>
(cherry picked from commit 92f58f80b1eb8f763266d96a9be0705a2535b178)
2018-04-17 11:14:41 +00:00
Maxime Guerreiro
596a913f06 Rename the publishCommentsOnPush option in GWT
Adjust documentation accordingly. PolyGerrit uses the sort name
"Publish comments on push", and it was not possible to find this name in
the documentation.

Change-Id: Ib9797b43f4b2ac028dbbeab95287b34ec25de067
2018-04-09 09:02:13 +00:00
Patrick Hiesel
6fbbdaa4f6 Remove CURRENT_COMMIT from default SubmittedTogether opts
SubmittedTogether potentially returns hundreds of changes.
CURRENT_COMMIT requires opening the repository that contains the change
to load more information about the commit. This can make the endpoint
very slow (>1 minute for 500 changes).

SubmittedTogether already provides a way of specifying additional
options for ChangeJson. Therefore removing an option from the defaults
seems safe as users that still want to receive commit information can
just specify o=CURRENT_COMMIT on the request.

This commit specifies this option for the GWT UI so that we don't run
into (potential) issues with WebLinks. Since the GWT UI will be deleted
soon, keeping it on the slow version of the endpoint seems OK.

This commit also implements a lazyload boolean in SubmittedTogether.
This forces the default call to not do any lazyloading which helps us to
catch issues earlier. The boolean is updated if the user specified an
option that requires lazy loading.

Change-Id: I763d15447fa79846fe0656a869b15edcf8502cb5
2018-04-05 15:30:12 +02:00
Patrick Hiesel
cf57d19f05 Make SetAccessUtil#validateChanges respect plugin capabilities
Bug: Issue 8465
Change-Id: Ic601d542a89310ef1df0360aed962a146e44bcc5
2018-04-04 08:27:23 +02:00
Dave Borowitz
d2f5af379c Merge branch 'stable-2.15' into master
Fix two test failures due to the merge:

* StandaloneNoteDbMigrationIT assumed that GCing All-Users would prune
  all loose objects, whereas in recent JGit versions, unreachable
  objects are left loose unless gc.pruneExpire is set to "now". Do this
  in the tests.

* AbstractQueryChangesTest#watched modifies the user's project watches.
  In the master branch, watches are now stored in the AccountState
  instance, so we need to recreate the IdentifiedUser in order to reload
  the AccountState.

* origin/stable-2.15: (33 commits)
  Release 2.15
  Mention groups index in documentation of index start command
  Enable UI action to toggle WIP flag for admins
  Docs: Clarify that for external groups the name in GroupInfo can be missing
  AccountGroupAuditLogScreen: Display group UUID if group name is missing
  GetAuditLog: Fix NPE if group UUID cannot be resolved
  Limit assignee suggestions to users that can see the change
  Add account predicate that checks if user can see a certain change
  Allow admins to toggle the WIP flag on all changes
  Included-In dialog polish
  PolyGerrit: Add support for "Included In"
  Make template testing faster
  Limit assignee suggestions to users that can see the change
  Add account predicate that checks if user can see a certain change
  AbstractQueryChangesTest: Extend byDraftBy to include test for "has:draft"
  AbstractQueryChangesTest: Add explicit tests for is:watched and watchedby:
  AbstractQueryChangesTest: Add explicit tests for is:abandoned and status:abandoned
  user-search: Clarify behavior of default search resulting in single change
  user-search: Fix query used in "My > Watched Changes"
  Documentation: Clarify ref-updated event content when ref is deleted
  Update git submodules
  Fix markup in Documentation section sendemail
  Allow graceful rolling restarts
  Release 2.15-rc4
  user-search: Remove incorrect statement about default searches
  user-search: Fix incorrect label: search example
  StandaloneSiteTest: Ignore user and system git config
  Fix documentation about create and delete branches
  GcAllUsers: Respect gc.auto=0 in All-Users
  GcAllUsers: Add extra log line in online case
  MigrateToNoteDb: Auto-flush and close GC writer
  Turn off autoReindexIfStale by default
  GC All-Users after migrating to NoteDb

Change-Id: If2dff6bd1e0b299be75878aca3bc45103a5a875f
2018-03-29 10:26:18 -04:00
Edwin Kempin
92f58f80b1 AccountGroupAuditLogScreen: Display group UUID if group name is missing
The group name is missing if there is no group backend that can resolve
the UUID. This can e.g. happen if the singleusergroup was used and
single user groups have been added to Gerrit groups, but then the
singleusergroup plugin was uninstalled so that the single user groups
can no longer be resolved.

Change-Id: I1bccec4bb38b55f6ad9b2d2ac83227b379d09071
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-03-26 11:16:52 +02:00
Edwin Kempin
08606b49a2 Limit assignee suggestions to users that can see the change
Bug: Issue 5181
Change-Id: Ib64248a285e8feca1fd8f18e825f302d09d252ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-03-25 13:55:56 +01:00
Edwin Kempin
354f9e61c7 Limit assignee suggestions to users that can see the change
Bug: Issue 5181
Change-Id: Ib64248a285e8feca1fd8f18e825f302d09d252ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-03-22 14:19:41 +09:00
Edwin Kempin
191aaa7e24 Limit assignee suggestions to users that can see the change
Bug: Issue 5181
Change-Id: Ib64248a285e8feca1fd8f18e825f302d09d252ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-03-20 07:55:58 +00:00
David Pursehouse
05af76fa4b Merge branch 'stable-2.15'
* stable-2.15:
  ChangeIT: Temporarily disable tests related to group matching
  Align SSH create-project with REST API
  SubmoduleOp: Fix formatting of submodule update commit message
  Fix Postgresql JDBC driver leaking memory
  Document that the build works with Python 2 or 3
  merge_jars.py: Fix for python 3 compatibility
  project.py: decode byte output from check_result
  license and doc: Add support for python3
  Bazel: Make build tool chain python 3 compatible
  ExternalIds NoteDb migration: Avoid intermediate migration state
  Make PrivateStateChanged and WorkInProgressStateChanged singletons
  BatchProgramModule: Bind GitReferenceUpdated.DISABLED
  BatchProgramModule: Don't bind event classes to null
  Document that Python 2 is required by the build
  Make event firing classes singleton
  Fix ConcurrentModificationException when posting reviews
  Revert partially "Trim multi-line arguments for task name and ssh_log"
  BaseCommand: Fix formatting of task description with arguments
  Add analytics to the list of plugins
  config-plugins: Consistently use "/+doc/" for documentation links
  config-plugins: Fix link to ref-protection plugin documentation
  config-plugins: Add readonly plugin to plugin list
  Add documentation for SshCreateCommandInterceptor
  Allow plugins to intercept ssh command creation
  GWT/Poly: Default to "Create initial commit" during project creation
  Revert "Reduce chance of deadlock in account cache"
  commit-msg: Adapt to awk behavior change on Cygwin/MSYS
  Expand docs on how to include external dependencies in core plugins
  Document how to bundle custom plugins in release.war
  Group members can't be added as reviewers if a matched username exists
  Set version to 2.13.11
  StreamEventsApiListener: Prevent NPE when account is null
  Set version to 2.11.11
  Replace links to code.google.com/p/gerrit
  Update issue tracker URL in documentation
  Update issue tracker URL in POM files
  Bump jsch to 0.54
  Update jsch to 0.1.53
  Bump Jsch to 1.52

Change-Id: Icec3dcfe53146da7d66d4d690afdd9e77ee10380
2018-03-12 09:03:47 +09:00
Gustaf Lundh
56cd578e3c GWT/Poly: Default to "Create initial commit" during project creation
Common support cases for our Gerrit admins stems from users creating
projects without an initial empty commit. The absolute vast majority
of end-users do want an initial commit in their newly created projects,
but sometimes misses to check the "Create initial commit"-checkbox in
the UI. When failing to do so, the situation may be a bit problematic
to remedy for the end user since:

* It is not always clear why they cannot push reviews to their newly
created git.
* It is cumbersome to create an empty root commit for casual git users
* Direct push to refs/heads/* is not always permittable

At our company we have yet to see someone creating an empty commit and
do not want it.

Change-Id: I2462e5fb7dbb68b0816ec25fa0b42ad135a2bb68
2018-02-28 06:54:21 +00:00
Changcheng Xiao
9ff64a60c5 PostReview: Remove support for 'strictLabels' option
Currently we support strict/non-strict label in PostReview,
which is controlled by the 'strictLabels' option.

For strict labels, we require all labels to be within the
user's granted range. Attempting to vote a label value not
granted will fail the entire operation. For non-strict labels,
we squashes the proposed value to the nearest granted value
and the operation will be executed.

This change removes the support for non-strict labels.

Change-Id: Icb9dfafea567e1e9c469811e830e3519b865700f
2018-02-21 09:25:21 +00:00