summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update replication plugin to latest revisionv2.11.3David Pursehouse2015-08-211-0/+0
| | | | | | - Fix broken formatting in documentation Change-Id: Ifb489fac38c83569c5d0a2b4bfa0630a3532ed74
* Release notes for Gerrit 2.11.3David Pursehouse2015-08-212-0/+94
| | | | Change-Id: Iccf55eda1ec7ddfd4bce1f49659975a91d3d9304
* ContainerAuthFilter: honor username provided by containerUrs Wolfer2015-08-195-47/+144
| | | | | | | | | | | | | | | | | When 'trustContainerAuth' is enabled and proxy does authentication on root (instead of '/login/'), ServletRequest#getRemoteUser is null. In this case we need to pull the username from 'Authorization' header. It is done the same way in HttpAuthFilter already. Move username extraction logic from HttpAuthFilter to RemoteUserUtil and add some tests. Update javadoc to reflect current situation: ContainerAuthFilter is also used for the REST API; see: GitOverHttpModule#configureServlets: filter("/a/*").through(authFilter) Change-Id: I0cf21fb7ecd8a958fad270704c11ebfffd9fea93 Bug: Issue 2209
* Stop logging Unknown GroupMembership for UUID: nullShawn Pearce2015-08-081-0/+12
| | | | | | | | | | | | | | Some chunk of code in Gerrit is frequently passing a null AccountGroup.UUID into the membership checker. For most Java collections (which memberships looks like), .contains(null) is just gracefully false. Honor that behavior by gracefully skipping a null UUID. Continue to log any UUIDs which have no registered backends. These may be errors caused by plugins not loading that an admin should pay attention to and try to resolve. Change-Id: Id0a24db6ac57574315cb93c76ad0e0f180d67352 (cherry picked from commit 74861171bc7bdaedd8febc333d082455208c7bcd)
* Set version to 2.11.3David Pursehouse2015-08-059-9/+9
| | | | Change-Id: I3b8e81e3ff25d757cc82c9f13a211ac060363ec3
* Show correct change status for draft patch setsDavid Pursehouse2015-08-041-2/+6
| | | | | | | | | | | | If a change is draft, the change status is correctly shown as "Draft". However if a new patch set is uploaded as draft to an already published change, the draft status is not considered. Add checks for the status of the currently viewed patch set, and show the status as "Draft" as appropriate. Bug: Issue 3478 Change-Id: Ic2bd739050a85d4897819162e6eee4633888c53f
* Merge "Call NewProjectCreatedListeners after project creation is complete" ↵Edwin Kempin2015-08-042-11/+11
|\ | | | | | | into stable-2.11
| * Call NewProjectCreatedListeners after project creation is completeJamie Cooper2015-08-032-11/+11
| | | | | | | | | | | | | | | | | | | | | | The listeners were being called before all project details had been created and recorded. Corresponding change in the cookbook plugin adds a sample listener to demonstrate the behaviour. Bug: Issue 3366 Change-Id: If1cf4053de7539e16a3d26a119a3406671e2e4ca
* | Add an acceptance test for pushing changes with Signed-off-byDavid Pursehouse2015-08-042-0/+42
| | | | | | | | | | | | | | | | I thought this functionality wasn't working, but while writing this test I realised it was simply because my account had the forge committer permission. Change-Id: I1e5cf3b92ecbb2ba296cf9874c3350ea57a123ee
* | Merge "PushOneCommit: Fix usage of assertThat" into stable-2.11Edwin Kempin2015-08-041-3/+3
|\ \
| * | PushOneCommit: Fix usage of assertThatDavid Pursehouse2015-08-031-3/+3
| |/ | | | | | | | | | | | | The expected and actual values were passed in the wrong order, resulting in confusing failure messages. Change-Id: Ic283261fd5d6afd3c9988c04349785ea9d43da8f
* | Merge "Fix client error when current patch set is not visible to user" into ↵Edwin Kempin2015-08-043-7/+9
|\ \ | | | | | | | | | stable-2.11
| * | Fix client error when current patch set is not visible to userDavid Pursehouse2015-08-043-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the latest patch set of a change is a draft that is not visible to the logged in user, clicking on the side by side diff link causes a javascript error on the client. Root cause is that the current_revision() method returns null in this case. Bug: Issue 3477 Change-Id: I0cd771ae8b42489f6d5bf374a6810b5812fcaf31
* | | Merge "ReceiveCommits: Include canonical URL in "change closed" error" into ↵Edwin Kempin2015-08-041-1/+1
|\ \ \ | |/ / |/| | | | | stable-2.11
| * | ReceiveCommits: Include canonical URL in "change closed" errorDavid Pursehouse2015-08-041-1/+1
| |/ | | | | | | | | Bug: Issue 3468 Change-Id: Ic594bfaef99b594a35a7426250d1dd0b500d4132
* / ListDashboards: Use correct channel for loggerDavid Pursehouse2015-08-041-1/+1
|/ | | | Change-Id: I0170250db39da68604053e6da23898c6f7e6d48a
* Merge "Add "Uploaded patch set 1" message for the UI changes" into stable-2.11David Pursehouse2015-08-032-0/+12
|\
| * Add "Uploaded patch set 1" message for the UI changesDavid Ostrovsky2015-07-312-0/+12
| | | | | | | | | | Bug: issue 3505 Change-Id: I5d8977cbe09cefa8e598fcb2bd1204c487ae3560
* | Disallow publish change edit when user has not signed CLADavid Ostrovsky2015-07-313-0/+35
|/ | | | | Bug: issue 3504 Change-Id: I4b3b5607e8742c90ceb68e87c571df076cd82dad
* Subscribe to proper project when nested projects existJanice Agustin2015-07-302-4/+26
| | | | | | | | | | | | | | | | | | | Submodule subscription would parse from the end of the url and return a subscription to the first project it would find. Now, continue to parse the url and subscribe to the project found with the most complete name. Example: Project "a/b" exists Project "b" exists Submodule subscription url = ../a/b Old behaviour: Would subscribe to project "b" Expected: Subscription to project "a/b" Change-Id: I284b681d3098ff6ec2915fc90a047e2f329babfd
* Merge "Replace vanilla parboiled with grappa library" into stable-2.11David Pursehouse2015-07-303-26/+24
|\
| * Replace vanilla parboiled with grappa libraryDavid Ostrovsky2015-07-283-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grappa library was chosen by Gitiles project to implement markdown rendering. Grappa library includes non-relocated parboiled library that is incompatible with vanilla parboiled library. When Grappa driven gitiles-plugin is deployed in Gerrit, there is a class collision. The only way to make them co-exist is to relocate one of them, using JarJar utility. But doing it can be error prone as this issue has shown: [2]. This change takes another approach and replace parboiled library in Gerrit core with Grappa library. This fixed the deployment problem with gitiles-plugin: markdown files rendering work as expected. [1] https://github.com/fge/grappa [2] https://github.com/sirthias/parboiled/issues/80 Change-Id: I793a84013468bf9fd07e62960bc2e789674ff35c
* | SideBySide: Fix Render=Slow to disable on huge filesShawn Pearce2015-07-282-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chrome cannot render a 6,000 line file with syntax highlighting when Render = Slow and Context = Whole File. The browser chokes on the nearly 13,000 <div style='position:relative'> elements created by CodeMirror to wrap around each line, in both sides. Layout is so slow on Chrome that typing inside a DraftBox textarea has 220ms lag between key presses. Firefox and Safari have similar performance issues, but do manage to keep up with typing slightly better than Chrome. The original intent of this code was to disable Render=Slow on a large file, but the conditional logic was broken. CodeMirror was created anyway with viewportMargin: Infinity. Fix the logic to disable the Render=Slow setting without changing the user's preference. Change-Id: Ic37a4343dfa98b08b6f76a1059e2dfd01d9af4cb
* | Prefer JavaScript clipboard API if availableShawn Pearce2015-07-2810-10/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | Modern versions of Chrome support a draft clipboard API from JavaScript that allows copying without use of a Flash movie. If the API appears to be available in the browser prefer it over the Flash movie. Leave the clippy.swf support in as ancient browsers are still going to be around for many years and will continue to require the Flash movie to put text on the clipboard. Change-Id: I1984801c8fa9c398ea4edf762f700e4a50e1da61
* | Hide hasFlash inside of UserAgent.Flash.isInstalledShawn Pearce2015-07-282-18/+34
| | | | | | | | | | | | | | | | | | Clarify this only means the Flash plugin is installed in the browser. It may be disabled by the user's preferences, or set to "click to run" mode, where an empty gray box is displayed until the user clicks the box to start the Flash content. Change-Id: I1e12c8382ed6fea5dec449fce4b762b84e95e706
* | Remove PluginSafeDialogBox, PluginSafePopupPanelShawn Pearce2015-07-2819-247/+23
|/ | | | | | | This is dead code since 2.8 (84275b24d6b3676b9eb). Nothing listens to the event. Change-Id: I4dfc5ee070c98f643f7a1090d7468074dd3530b2
* Update Guice to version 4.0David Pursehouse2015-07-271-4/+4
| | | | | | | | Fixes a bug [1] which prevented Gerrit startup under Java 8. [1] https://github.com/google/guice/issues/904 Change-Id: Ie8be80351c06cef77e892725cc7a03663c4c4e02
* Merge "Don't suggest inactive accounts" into stable-2.11Shawn Pearce2015-07-221-3/+15
|\
| * Don't suggest inactive accountsSaša Živkov2015-07-211-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | When, for example, adding accounts to a group the drop down list would also suggest inactive accounts. Exclude the inactive accounts from the suggestion. NOTE: suggesting of reviewers doesn't have this issue as this is a different code. Ideally, suggesting accounts and suggesting reviewers should be refactored to use the same suggestion algorithm. However, this would be a larger change and better suited for the master branch. Change-Id: I6bd22739c326a77dbf6fc3f36ee245d9e6939e34
* | Add missing fix in 2.11.2 release notesDavid Pursehouse2015-07-141-0/+6
| | | | | | | | Change-Id: If384e918fb7396ef2523524bdaee3d5f978897bd
* | Fix broken link in 2.11.2 release notesDavid Pursehouse2015-07-141-1/+1
|/ | | | Change-Id: Ib4ed99d0f5ea148c3ba04b2eedaa611e272cf977
* Set version to 2.11.2 in dev-plugins.txtv2.11.2David Pursehouse2015-07-141-1/+1
| | | | Change-Id: If4a6fed4ab665ec23c4c79e9777db446d3e5d0df
* Release notes for Gerrit 2.11.2David Pursehouse2015-07-132-0/+98
| | | | Change-Id: I36d4f06a047992421b8eac1e937945b28439872c
* Bind OnlineReindexer.Factory in LuceneIndexModuleDavid Pursehouse2015-07-131-1/+1
| | | | | | | | | | | | The OnlineReindexer.Factory is only bound in MultiVersionModule. This causes some of the acceptance tests to fail with the error "no implementation bound" because the SingleVersionModule is being used, which does not bind OnlineReindexer.Factory. Bind it in LuceneIndexModule instead, so it's used in both cases. Change-Id: I6df22bb405621485e5dcba2a5d0e0a14de372f8a
* Add ssh command to activate the latest indexHugo Arès2015-07-096-2/+108
| | | | | | | In case the online indexer fails, this allows the admins to activate the latest index. Change-Id: I59ebf2bce02a599b87d0f7771fc806ff64a3ba64
* Add ssh command to restart online indexerHugo Arès2015-07-098-12/+171
| | | | | | | In case the online indexer fails, this command allows admin to restart it without having to restart Gerrit. Change-Id: I73435de62c357537d173c5eafd6ad60d3b49fc73
* Merge "PluginAPI: Don't convert to String in RestApi.get() method" into ↵David Pursehouse2015-07-063-7/+129
|\ | | | | | | stable-2.11
| * PluginAPI: Don't convert to String in RestApi.get() methodDavid Ostrovsky2015-06-293-7/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RestApi helper class makes use of ActionContext that makes use of RestApi in Gerrit core to route Rest calls. Because ActionContext was optimized for invocations from JavaScript plugin hooks, it's converting NativeString to String. The easiest way to see why this behaviour is needed is to investigate the call graph: ActionButton => ActionContext.call() => ActionContext.get() => RestApiCore.get() => return NativeString.asString() => alert() called from JavaSrcipt that dump string content. An example of this approach is implemented in cookbook-plugin: 1 function onSayHelloProject(c) { 2 var f = c.textfield(); 3 var t = c.checkbox(); 4 var b = c.button('Say hello', {onclick: function(){ 5 c.call( 6 {message: f.value, french: t.checked}, 7 function(r) { 8 c.hide(); 9 window.alert(r); 10 c.refresh(); 11 }); 12 }}); Without this implicit conversion the output on the line 9 in the example above would not be: "Hello dude..." but "[Object]". While this implicit conversion is needed and correct in this use case, when calling Rest API invocations from ActionButton, it is not wanted and wrong when called from normal plugin screen through RestApiPlugin, that makes itself use of the same implementation of ActionContext, to route the RestAPI calls to RestApiCore implementation. The call graph: PluginScreen => RestApiPlugin.get() => ActionContext.get() => RestApiCore.get() => return NativeString.asString() => type error That's because in this use case, no implicit conversion should happen, as the callback expects NativeString and not String, e.g.: private void retrieveGerritVersion(final Screen screen) { new RestApi("config").view("server").view("version") .get(new AsyncCallback<NativeString>() { @Override public void onSuccess(NativeString r) { screen.setPageTitle("cookbook index@" + r.asString()); } [...] Conclusion: while correct and expected in one use case, it's wrong and leads to breakage in another use case. To rectify it, avoid conversion when called from RestApiPlugin, as it's never wanted: PluginScreen => RestApiPlugin.get() => ActionContext.get2() => RestApiCore.get() => return NativeString The same problem is fixed for the other Rest methods {put|post|delete}. Change-Id: Id6c042478cab797838c1808602712a48039ec062
* | Merge "Fix disabling of git ssh 'download' scheme within ↵David Pursehouse2015-07-063-9/+28
|\ \ | | | | | | | | | DefaultCommandModule" into stable-2.11
| * | Fix disabling of git ssh 'download' scheme within DefaultCommandModuleMarco Miller2015-06-303-9/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this fix, corporate /global gerrit users (like ours) can still use ssh despite the latter commands being disabled by instance admins. That keeps the ssh door wide open, while only the http one shall work. (Such deployments are then unable to restrain ssh traffic.) Change Daemon and WebAppInitializer so they construct DefaultCommandModule with the DownloadConfig singleton. DefaultCommandModule can then use the latter to skip the binding of the git ssh (receive and upload) commands, if ssh [download] scheme is not enabled in gerrit.config. Change-Id: Ica4e0ffeea1f34bc5411b6863a90fb0450c9e874
* | Merge "Fix wrong date/time for commits in refs/meta/config branch" into ↵Edwin Kempin2015-07-031-3/+3
|\ \ | | | | | | | | | stable-2.11
| * | Fix wrong date/time for commits in refs/meta/config branchEdwin Kempin2015-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the refs/meta/config branch is modified using the PutConfig REST endpoint (e.g. when changing the project configuration in the web UI) the commit date/time is wrong. Instead of the actual date/time the date/time of the last Gerrit server start is used. This is because MetaDataUpdate.User which gets the GerritPersonIdent injected is kept as member in the PutConfig singleton and the date/time for commits in the refs/meta/config branch is retrieved from that GerritPersonIdent instance which is only created once when the PutConfig singleton is instantiated. Bug: Issue 3371 Change-Id: I85424db74e8609c8e4117e8db78a80730c29ace1 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
* | | Merge "Avoid NPE in get related changes" into stable-2.11David Pursehouse2015-07-021-1/+4
|\ \ \ | |/ / |/| |
| * | Avoid NPE in get related changesJanice Agustin2015-06-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do a null check before getting the change from change data. A null pointer exception was reported when getting related changes [1]. The change that introduced this vulnerability is [2]. [1] https://groups.google.com/forum/#!topic/repo-discuss/3oS_ynJqGjo [2] https://gerrit-review.googlesource.com/#/c/63221 Change-Id: I9ca2616492f665044e757a1c0d5dd604c29b21cc
* | | Update download-commands plugin revisionEdwin Kempin2015-06-301-0/+0
| | | | | | | | | | | | | | | Change-Id: If027fb113d3cf265dfe84e32898fff1b0f1e48f7 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
* | | Make sure /a is not in the project name for git-over-http requestsSaša Živkov2015-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "/a" prefix is used to trigger authentication but was not removed from the request's pathInfo. Therefore, it was included in the project name and hence the project wasn't found when performing, for examples: $ git fetch http://server/a/project Change-Id: I9eadd5759d5936f040431ebbb401c35c437f537e
* | | Update plugin archetype version in plugin documentation to 2.11Edwin Kempin2015-06-301-1/+1
|/ / | | | | | | | | Change-Id: I4b70901816a10723bfd102400f7f7bfe1c984860 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
* | Merge branch 'stable-2.10' into stable-2.11David Pursehouse2015-06-303-1/+16
|\ \ | |/ |/| | | | | | | | | | | * stable-2.10: Update version to 2.10.6 Release notes for Gerrit 2.10.6 Change-Id: I9bc2d68bbfe5f19081e8c7b26ca509628dd19c28
| * Update version to 2.10.6v2.10.6Saša Živkov2015-06-299-9/+9
| | | | | | | | Change-Id: I2e41f2b6044563f4f63324fa50ad8ed3145d8c24
| * Release notes for Gerrit 2.10.6David Pursehouse2015-06-292-0/+15
| | | | | | | | Change-Id: I49b5094db78ca28e0ae56732670e9f0f62b310b2