* Update plugins/replication from branch 'master'
to a62d1c601e6c7fb669c847a0e1843e6f60cd1cb2
- Merge branch 'stable-2.15' into master
* stable-2.15:
GerritSshApi: Use Logger's string formatting
Revert "Use proper HEAD ref value when creating project"
Fix creating missing repository
Fix project deletion logs
Use logger built-in formatter
Fix project creation logs
Change-Id: I0c2c6c0638275e91c15d7c2871cb1c3cffa259c6
- Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Fix creating missing repository
Fix project deletion logs
Use logger built-in formatter
Fix project creation logs
Change-Id: Idacfd3fa54d7ff5e974bc8dae41979d1f0d9b6b5
- GerritSshApi: Use Logger's string formatting
Change-Id: Ie7fef1b311f6f7fe14aa79c6023b897d91127087
- Revert "Use proper HEAD ref value when creating project"
The issue fixed by this commit was fixed in a different way on the
stable-2.14 branch. Reverting this on stable-2.15 will make the merge
from stable-2.14 easier.
This reverts commit e145010de7911623c98e6111537ffa4997d1a82e.
Change-Id: I7e44f62f119b7ed26c8d96bfe9ef8442ff687b29
- Fix creating missing repository
When replicating to a destination where the repository does not exist,
updating the HEAD reference failed because the passed reference name was
not absolute. When this happened, an unchecked exception was triggered
but never showed in the logs. In fact, the replication logs were showing
only the message announcing the replication started, but no additional
information about the success or failure of the operation was displayed.
Avoid this by resolving symbolic references and checking the reference
is absolute before trying to update the HEAD in the new repository.
Change-Id: I18295a37a04413ba64bf7e9ee31640ee23c4c1e0
- Fix project deletion logs
Log was showing project was deleted successfully even if it failed.
Change-Id: I7be19991619ce1f205884a8b6658d9a7ed4109c7
- Use logger built-in formatter
Change-Id: I6b46309f07ca4c402ae7a51cfb462c1be6bec333
- Fix project creation logs
Log was showing project was created successfully even if it failed.
Change-Id: Ie37e6f2f58e1c8b4e33f61bf2d81ee43698b8aa3
PermissionBackend is supposed to only contain permission related checks.
Apparently, this #isHidden is a project state check rather than a
permission check. Thus it should be removed from the ProjectControl,
which is part of the DefaultPermissionBackend.
Before removing this, "ACCESS" permission checks for hidden projects will
only succeed for the project owners. After removing, they may also succeed
for other users, e.g. internal user.
The existing checks for "ACCESS" could be divided into two categories
base on whether it's helpful for users to change the configuration of
the project state or not.
For the helpful case, this commit preserves the current behavior of
the "ACCESS" check on hidden projects by checking the "READ_CONFIG"
permission which will only succeed for the project owners. For the
other case, this commit rejects directly even for project owners if
the project is hidden.
Change-Id: I20743e6380129eea7cb942d8d9ccad314e29d187
Checking permissions of users that aren't the caller on the current request
can have implications on the security of the system. The most prominent
one is creating a group-oracle.
To limit the cases where we could potentially expose Gerrit to these
threats, PermissionBackend removes the method that was operating solely
on the provider of the current user.
Change-Id: I601ea1200a15a5f262ca0770b23cc1c7bee126b1
* Update plugins/codemirror-editor from branch 'master'
to fa9df3035c306069758712bfe9ae3425b119bb0c
- Add rulers addon
Allows for vertical rules to be shown.
Change-Id: I4a2cf1bfae15945e0f622045524c56b2cddc16a1
* Update plugins/codemirror-editor from branch 'master'
to 32753c4e226fe6297795c7d80166203719d6e48f
- Add multiplex addon
Use case is codemirror breaks when using mutiple languages in one file
multiplexingMode is required by htmlembedded so needs multiplex addon.
Got this javascript error:
- "TypeError: undefined is not a function (near '...a.multiplexingMode...')"
This change fixes it.
See [1]
[1] 04d39f236a/mode/htmlembedded/htmlembedded.js (L18)
Change-Id: I9c79d77c902dbb22271f33d9d6e2f9e50726d411
The new version provides better support for Java 9 and improves
performance. Multibindings artifact in now included in the guice
core artifact. The full release notes is here: [1].
[1] https://github.com/google/guice/wiki/Guice42
Change-Id: I208d53ce1cf9b99ed8f03ae34470e95c3b8f71ce
* Update plugins/codemirror-editor from branch 'master'
to 2b4c25eaac2f1472731443d6613277ef8486e8a6
- Add more addons
Change-Id: I6de2a0372e968dd0af773d9532d0ce4ab85774da
* Update plugins/singleusergroup from branch 'master'
to ebb26f549e7b8d072739b31a6b6387fbb89c34f3
- SingleUserGroup#suggest: Use Java 8 stream to transform list
Change-Id: I1839f0f26cca5da622dbc6b8d79d8118219290a4
* stable-2.15:
Fix IndexCollection propagation into plugin guice injectors
Set version to 2.15-SNAPSHOT
Fix account_patch_reviews for mysql
Mark all "My" menu links as external
Disable target="_blank" on MyMenu items
Batch index executor: make use of the value passed for threads requested
MigrateToNoteDb: Hackily limit to 4 threads by default for H2
NoteDbMigrator: Avoid holding pending change operations in memory
NoteDbMigrator: Actually close ReviewDb after scanning projects
Set version to 2.13.10
Change-Id: I352d2d3d2889da3f9b36599d6c37f05c3a3a29ee
This fixes a regression caused by: I3c4616d08e. As the consequence
index collection instances were not correctly propagated into plugin's
Guice injectors. A test is added in singleusergroup plugin to avoid such
breakages in future.
Bug: Issue 8398
Change-Id: I87e29a798a83b03f9daa2cfe4708d89becae201e
This commit adds signatures to filter refs by visibility to
PermissionBackend.ForProject.
VisibleRefFilter is renamed to DefaultRefFilter and moved into the
permissions package. Minor changes to the class make it fit better into
the new interface structure and make the class easier to read.
Instead of offering config options on the class, this commit adds an
Options AutoValue and forces callers to provide an open repository
handler to the filter method.
Change-Id: I1819de0bab81ed546f1c35461cc5361f1c4027ba
* Update plugins/codemirror-editor from branch 'master'
to ed0035016ed897c72c023787077aa3d037da14cf
- Style codemirror-editor line nums
Also adds a focus call to the editor on attachment.
Change-Id: I15301fb185ede467d6d4b12fbae57061e265e35f
Since ExternalId.USER_NAME_PATTERN_REGEX is now no longer used by
external callers it is made private.
Change-Id: Id7a108bf39baffc52273879bbf8973dbbea0ae0c
Signed-off-by: Edwin Kempin <ekempin@google.com>
* Update plugins/codemirror-editor from branch 'master'
to bac9b336a326585accfc9a9eda7b5340e62783ac
- Add simple.js addon
Dockerfile mode requires this js file
Also move addon's ontop of the modes, so that they are loaded before
the modes to prevent js error's when the mode's require them.
See:
https://github.com/codemirror/CodeMirror/blob/master/mode/dockerfile/index.html
Change-Id: Ic9d7d2fbd4b21885d5ffe91bc438c314a113b0a0
* Update plugins/codemirror-editor from branch 'master'
to 2129fd987d0453e8b470032c6cb7c1b49f9a59a6
- Merge "Add CSS for whitespace and tabs"
- Add CSS for whitespace and tabs
Change-Id: Ibb47077a0f74ec3b72848d0feac9a49db6388b0e
* Update plugins/codemirror-editor from branch 'master'
to 89285ff476c22d39d35b7347c18a32fec1ee741b
- Add docker language to syntax highlight
Use case is for it to be used on gerrit-review as we
Use it for ci image.
Change-Id: If612da9509353a5b043b5763cf67a0616439b2b5
User names are stored as external IDs, hence the regular expressions to
validate the format of a user name should be part of the ExternalId
class.
There is one place in the GWT UI where user names are validated. Since
the GWT UI doesn't have access to the ExternalId class it needs to copy
two of the regular expressions. This should be OK since the format of
user names is not expected to change and the GWT UI will be gone soon.
It's actually a goal to remove all dependencies from the GWT UI on the
Account class so that the Account class can be moved out of the
reviewdb.client package and be turned into an immutable AutoValue type.
Change-Id: I6ea7139019eb0e7f0e06efaf77ec4bd89d514006
Signed-off-by: Edwin Kempin <ekempin@google.com>
maybeGet is the method that most callers should use. Make this more
obvious by renaming it to get. Also the return type of Optional already
implies that there might not be a result, hence the method name doesn't
need to be explicit about this.
Change-Id: I571fa9989b2629d96f2238d4b8571d669a9bc89d
Signed-off-by: Edwin Kempin <ekempin@google.com>
* Update plugins/reviewnotes from branch 'master'
to a3235952b0138499894fdcefedce48d7df65e8b3
- HeaderFormatter: Use Strings.isNullOrEmpty
Change-Id: I8185804e1ed50e6d182da20d8ef00bd8b0134a78
Signed-off-by: Edwin Kempin <ekempin@google.com>
- Use AccountCache#maybeGet instead of AccountCache#get
AccountCache#get returns an empty AccountState to represent a missing
account and the full name and the preferred email of the empty
AccountState are always null. Handle the missing account case explicitly
instead of using an empty AccountState.
Change-Id: I340d1b426304550ae9b368623e15291f8f1dbb92
Signed-off-by: Edwin Kempin <ekempin@google.com>
* Update plugins/hooks from branch 'master'
to 337a1e8ebbecd7a96f3a6676980fb1c5c0385f56
- Merge branch 'stable-2.15'
* stable-2.15:
Add README
Reword introduction in configuration documentation
Fix formatting in configuration documentation
Improve the "about" page
Change-Id: I4d91d62b4dea6f46f1464c0d6b3443b927bd7b5e
- Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Add README
Reword introduction in configuration documentation
Fix formatting in configuration documentation
Improve the "about" page
Change-Id: I416f37eb11ede961f2b7afbcf0a47f79ce9fc906
- Add README
Add a README.md file in the repository root with the same content as
the "About" page.
Gitiles will render the README by default when the project is viewed
on the googlesource site [1] and this will make the configuration
documentation and list of supported hooks more easily accessible for
users who have not installed the plugin yet in their Gerrit site.
[1] https://gerrit.googlesource.com/plugins/hooks
Change-Id: Ib2ecf818cbabaca8bfddf58e12cce99842a4f038
- Reword introduction in configuration documentation
Change-Id: I428167c7929a077386e281f4898e8f4693c315f2
- Fix formatting in configuration documentation
Change-Id: I7414451eea210df7cc3e4d865de5cc1286c7a4ef
- Improve the "about" page
Add a link to the git hooks documentation which gives more context
about what is "not supported". Add links to the configuration and
list of supported hooks.
Change-Id: Ica629c70334951124bce439a4672fa28b40a2d61
* Update plugins/hooks from branch 'stable-2.15'
to 9937b96271441f296a6557f98ed787960367b61f
- Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Add README
Reword introduction in configuration documentation
Fix formatting in configuration documentation
Improve the "about" page
Change-Id: I416f37eb11ede961f2b7afbcf0a47f79ce9fc906
- Add README
Add a README.md file in the repository root with the same content as
the "About" page.
Gitiles will render the README by default when the project is viewed
on the googlesource site [1] and this will make the configuration
documentation and list of supported hooks more easily accessible for
users who have not installed the plugin yet in their Gerrit site.
[1] https://gerrit.googlesource.com/plugins/hooks
Change-Id: Ib2ecf818cbabaca8bfddf58e12cce99842a4f038
- Reword introduction in configuration documentation
Change-Id: I428167c7929a077386e281f4898e8f4693c315f2
- Fix formatting in configuration documentation
Change-Id: I7414451eea210df7cc3e4d865de5cc1286c7a4ef
- Improve the "about" page
Add a link to the git hooks documentation which gives more context
about what is "not supported". Add links to the configuration and
list of supported hooks.
Change-Id: Ica629c70334951124bce439a4672fa28b40a2d61
* Update plugins/replication from branch 'master'
to 81a34e608c97e9ac6aa7b2678fca96427e212413
- Merge branch 'stable-2.15'
* stable-2.15:
Document how to exclude projects from replication
Change-Id: I331973ac31d889ed6c9c552f5e69c1ba09eb4314
- Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Document how to exclude projects from replication
Change-Id: I2189f3aabcdc5ee3ca8204886a6c7686af626c04
- Document how to exclude projects from replication
Change-Id: I8a12011e28be44d600a3ed63eebe596560d73e5f
* Update plugins/replication from branch 'stable-2.15'
to 5723f326849d823c36c722b749d3ec03b088e63c
- Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Document how to exclude projects from replication
Change-Id: I2189f3aabcdc5ee3ca8204886a6c7686af626c04
- Document how to exclude projects from replication
Change-Id: I8a12011e28be44d600a3ed63eebe596560d73e5f
* Update plugins/codemirror-editor from branch 'master'
to 6442943d6a6de21b7d6d25b3fad2753a3c30d2d8
- Merge "Add a few edit-related addons to codemirror"
- Add a few edit-related addons to codemirror
Change-Id: Ifc7b92623e362ca21f99022fd701982ba686a920
* Update plugins/codemirror-editor from branch 'master'
to 790e86331b02169309ee6f9e5256c31ffe6bb82e
- Remove some deleted prefs values
Also fixes the lack of negation of prefs.hide_line_numbers.
Change-Id: Ia854fb06564014c9d6a6ebe908eeda19821e8571
* Update plugins/codemirror-editor from branch 'master'
to 5d3c9d0a3b645fb626c76be799e3951f3caa976d
- Re enable line numbers through preference
Change-Id: I172dc86d7a19b23e97111751999dde7d601c1d8a
* Update plugins/codemirror-editor from branch 'master'
to 4101254bd08bc1e553b82d1e11543639c26e6d6b
- Move codemirror scripts and styles outside of the dom
Bug: Issue 8239
Change-Id: I661640c4aac188f172bd768996083b552ee6df95
This makes it more explicit that callers must handle the case where the
returned username is absent.
Change-Id: I97e33caa8e9cc8092dc398e3b383d7afd5beb96f
Signed-off-by: Edwin Kempin <ekempin@google.com>
* submodules:
* Update plugins/replication from branch 'master'
to fa0a581fe76cb6adcf796052fe54da1a996bfcc5
- Check explicitly if project state permits read
Change-Id: I8bd880b02897b1a4efb36ad430e70465b924be68
Some callers of AccountState#getUserName and
IdentifiedUser#getUserName() explicitly check that the user name is
non-empty to then treat it the same way as a non-existing user name.
Save the callers from this effort and move this check to a generic
place.
Change-Id: I65cc3403405ec702a0c30ca1f4b17555d97c1315
Signed-off-by: Edwin Kempin <ekempin@google.com>
This makes it more explicit that callers must handle the case where the
returned username is absent.
Change-Id: I01d2e3fd32726db6175c157bc71a551d35b4803f
Signed-off-by: Edwin Kempin <ekempin@google.com>
This makes it more explicit that callers must handle the case where the
returned AccountState is absent.
Change-Id: I3fcb50a8fc0db727d2e142de5b4546358f4132c3
Signed-off-by: Edwin Kempin <ekempin@google.com>
This makes it more explicit that callers must handle the case where the
returned AccountState is absent.
Change-Id: Ib679cdd6d05f712c0d0c8780eb607780a4a0a79d
Signed-off-by: Edwin Kempin <ekempin@google.com>
In I724cb3efe1, Id0d9030ad2 restapi library was isolated from server
library, but the library was missed to be exported in the plugin API.
This broke plugins in gerrit tree build mode: [1].
* [1] http://paste.openstack.org/show/646842
Change-Id: I24f23019ce929dc43a3d27d3809d9a885dac12e8
* Update plugins/codemirror-editor from branch 'master'
to b33196a3da70e75ad00b5ac787620b29d20fed65
- Remove a few buggy CodeMirror parameters
In particular, line numbers seem to be inexplicably broken in CodeMirror
when enabled in this plugin.
Also sets the height of the .CodeMirror to 'auto'.
Bug: Issue 8114
Change-Id: Ib7cd1f5d74418d6fa0e2a6b16b06ccd77090e06c
* Update plugins/codemirror-editor from branch 'master'
to 27f2c73897da46d22b73c12cfdad282edb4e687c
- Give editor a z-index
Prevents text appearing over the header.
Change-Id: Iad9712e4ef105bf37a2e166876a9d8ea77585fe7
- Merge "Add soy and velocity to syntax highlight"
- Add soy and velocity to syntax highlight
Use case is google and other teams use soy and velocity.
Change-Id: I6a36b4c6cb761f0a3deec50fce8cff99a1b6dd9b
With this change, the overflow is removed from every individual section
and element in the reply dialog, instead relying on only the top-level
component to overflow. The reply dialog is allowed to grow to the full
height of the screen when necessary.
Position: sticky is used to keep the dialog action buttons on screen at
all times. On platforms that do not support position: sticky, the
buttons will exist at the bottom of the dialog.
Bug: Issue 7579
Change-Id: I74c33591b96c4ca313bced56efe3cda214de8f10
* Update plugins/codemirror-editor from branch 'master'
to babdd60aa5af30fd010a6f5d1ba4987e9585ed0d
- Merge "Add soy and velocity to syntax highlight"
- Add soy and velocity to syntax highlight
Use case is google and other teams use soy and velocity.
Change-Id: I6a36b4c6cb761f0a3deec50fce8cff99a1b6dd9b
* Update plugins/codemirror-editor from branch 'master'
to 123da30f6cc3b1cd46b320fcd49cbf07f6a48b65
- Remove theme and key map references
These are not supported by the plugin yet, and should be added with
tests later.
This change fixes an incomplete and reverted change, 1a0c58f.
Change-Id: I42909a2d62f88a390942f2af58f7b5e6a5fbe554