Merge changes from topic 'load-changes-via-change-notes-factory'
* changes:
ScanningChangeCacheImpl: Load changes from notedb if enabled
ChangeControl.GenericFactory#validateFor: Don't load change from db
ChangeControl.GenericFactory: Use ChangeNotes.Factory to load change
Pass project to ChangeData so that it can load the change from notes
Store project field in change index
ChangesCollection: Lookup change in index when legacy ID is given
Always load change notes when they are created
Load change via notes factory in ConsistencyChecker#checkExpectMergedAs()
PostReview#forceCallerAsReviewer should set reviewer in notedb
Use ChangeNotes in more places to load the change
Load change in ChangeNotes.Factory
Fix parsing of current patch set from notes branch
Remove unused method in ChangeDataResultSet
ChangeJson: Remove unused format(Collection<Change.Id>) method
diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt
index db3218e..ac4d9a0 100644
--- a/Documentation/rest-api-accounts.txt
+++ b/Documentation/rest-api-accounts.txt
@@ -1083,6 +1083,14 @@
As result the account preferences of the user are returned as a
link:#preferences-info[PreferencesInfo] entity.
+Users may only retrieve the preferences for their own account,
+unless they are an
+link:access-control.html#administrators[Administrator] or a member
+of a group that is granted the
+link:access-control.html#capability_modifyAccount[ModifyAccount]
+capability, in which case they can retrieve the preferences for
+any account.
+
.Response
----
HTTP/1.1 200 OK
diff --git a/gerrit-lucene/src/main/java/com/google/gerrit/lucene/AutoCommitWriter.java b/gerrit-lucene/src/main/java/com/google/gerrit/lucene/AutoCommitWriter.java
index 4e47bca..4a53fc6 100644
--- a/gerrit-lucene/src/main/java/com/google/gerrit/lucene/AutoCommitWriter.java
+++ b/gerrit-lucene/src/main/java/com/google/gerrit/lucene/AutoCommitWriter.java
@@ -108,7 +108,7 @@
}
void manualFlush() throws IOException {
- flush(true, true);
+ flush();
if (autoCommit) {
commit();
}
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/account/GetPreferences.java b/gerrit-server/src/main/java/com/google/gerrit/server/account/GetPreferences.java
index de67c09..facc2ec 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/account/GetPreferences.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/account/GetPreferences.java
@@ -89,8 +89,8 @@
throws AuthException, ResourceNotFoundException, OrmException,
IOException, ConfigInvalidException {
if (self.get() != rsrc.getUser()
- && !self.get().getCapabilities().canAdministrateServer()) {
- throw new AuthException("restricted to administrator");
+ && !self.get().getCapabilities().canModifyAccount()) {
+ throw new AuthException("requires Modify Account capability");
}
Account.Id accountId = rsrc.getUser().getAccountId();
diff --git a/lib/lucene/BUCK b/lib/lucene/BUCK
index 6bc4834..524f605 100644
--- a/lib/lucene/BUCK
+++ b/lib/lucene/BUCK
@@ -1,11 +1,11 @@
include_defs('//lib/maven.defs')
-VERSION = '5.3.1'
+VERSION = '5.4.1'
maven_jar(
name = 'lucene-core',
id = 'org.apache.lucene:lucene-core:' + VERSION,
- sha1 = '36860653d7e09790ada96aeb1970b4ca396ac5d7',
+ sha1 = 'c52b2088e2c30dfd95fd296ab6fb9cf8de9855ab',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
@@ -16,7 +16,7 @@
maven_jar(
name = 'lucene-analyzers-common',
id = 'org.apache.lucene:lucene-analyzers-common:' + VERSION,
- sha1 = 'bd804dbc1b8f7941018926e940d20d1016b36c4c',
+ sha1 = 'c2aa2c4e00eb9cdeb5ac00dc0495e70c441f681e',
license = 'Apache2.0',
deps = [':lucene-core'],
exclude = [
@@ -28,7 +28,7 @@
maven_jar(
name = 'lucene-misc',
id = 'org.apache.lucene:lucene-misc:' + VERSION,
- sha1 = '7891bbc18b372135c2a52b471075b0bdf5f110ec',
+ sha1 = '95f433b9d7dd470cc0aa5076e0f233907745674b',
license = 'Apache2.0',
deps = [':lucene-core'],
exclude = [
@@ -40,7 +40,7 @@
maven_jar(
name = 'lucene-queryparser',
id = 'org.apache.lucene:lucene-queryparser:' + VERSION,
- sha1 = 'bef0e2ac5b196dbab9d0b7c8cc8196b7ef5dd056',
+ sha1 = 'dccd5279bfa656dec21af444a7a66820eb1cd618',
license = 'Apache2.0',
deps = [':lucene-core'],
exclude = [