507 Commits

Author SHA1 Message Date
Dave Borowitz
db20af7123 Update git submodules
* 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
2018-03-28 18:39:04 +00:00
Changcheng Xiao
da44fe4ba2 Remove the non-permission check #isHidden from ProjectControl
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
2018-03-29 10:40:19 +02:00
Edwin Kempin
9f07b9b6a8 Update git submodules
* Update plugins/replication from branch 'master'
  to dc1e7ff434fd7fce90dd6f6c4e312280bd884bd0
  - Remove unused member variable
    
    Change-Id: I8337ebcc6f45294de647c5731ae3c4efec549aca
    Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-03-28 11:28:23 +00:00
Patrick Hiesel
4bdef6c030 Remove PermissionBackend#user(Provider<CurrentUser>)
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
2018-03-27 15:57:45 +02:00
Changcheng Xiao
3d002433fc ProjectControl: remove "isHidden" when checking "READ" permission
Change-Id: I687f2957135bfba3c3a66617828980ddc5b14c85
2018-03-26 13:12:45 +00:00
Kasper Nilsson
f28b5b5e29 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to fa9df3035c306069758712bfe9ae3425b119bb0c
  - Add rulers addon
    
    Allows for vertical rules to be shown.
    
    Change-Id: I4a2cf1bfae15945e0f622045524c56b2cddc16a1
2018-03-13 18:40:09 +00:00
Paladox none
63c3aa86c2 Update git submodules
* 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
2018-03-09 23:41:17 +00:00
David Ostrovsky
1fa7774d23 Bump guice version to 4.2.0
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
2018-03-06 21:31:22 +00:00
Kasper Nilsson
ea81a30a5f Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to 714fc1057174227bd5acf4753039fe582c930e18
  - Always enable line numbers
    
    Bug: Issue 8430
    Change-Id: Id7a375de1b6bafec8ff3ec2fafa15bc05f02f0da
    
  - Add more addons
    
    Change-Id: I6de2a0372e968dd0af773d9532d0ce4ab85774da
2018-02-22 22:08:27 +00:00
Kasper Nilsson
1fc8edf5c9 Fix some styles with diff mode selector
Change-Id: I06642afcba42deee9590eae96b146401ea1d7220
2018-02-21 10:28:59 -08:00
Paladox none
678a5be336 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to 2b4c25eaac2f1472731443d6613277ef8486e8a6
  - Add more addons
    
    Change-Id: I6de2a0372e968dd0af773d9532d0ce4ab85774da
2018-02-20 20:26:54 +00:00
Edwin Kempin
96251c8d71 Update git submodules
* Update plugins/singleusergroup from branch 'master'
  to 45003c4e290cd29a8695db438ca30302fa0683c7
  - Fix compilation errors
    
    Change-Id: If714b63ba177c8f956af51fa02f5e8486bb2f8ee
    Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-02-19 23:45:43 +00:00
David Ostrovsky
4bf2f339a5 Update git submodules
* Update plugins/singleusergroup from branch 'master'
  to ebb26f549e7b8d072739b31a6b6387fbb89c34f3
  - SingleUserGroup#suggest: Use Java 8 stream to transform list
    
    Change-Id: I1839f0f26cca5da622dbc6b8d79d8118219290a4
2018-02-20 00:46:46 +00:00
Paladox
800341b606 Merge branch 'stable-2.15'
* 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
2018-02-20 09:48:58 +09:00
Paladox
cd127535f7 Fix IndexCollection propagation into plugin guice injectors
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
2018-02-19 23:26:56 +01:00
Paladox none
7928623091 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to 86824280c5693e669a0b719ddd9a51d1e85abcd5
  - Remove duplicate indentWithTabs pref
    
    Change-Id: I4ad2e744fd32235e82373c8053a1819ca8b0d91e
2018-02-15 22:16:54 +00:00
Patrick Hiesel
77fd024638 Move VisibleRefFilter into PermissionBackend
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
2018-02-14 14:42:05 +01:00
Kasper Nilsson
5d5f028114 Update git submodules
* 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
2018-02-13 17:28:04 +00:00
Edwin Kempin
cf18afe357 Update git submodules
* Update plugins/commit-message-length-validator from branch 'master'
  to 315a11558913fa8f9c6d3b1723e45583b25afa1c
  - Prefer using Splitter to String.split
    
    String.split(String) has surprising behaviour [1]:
    
    String[] nothing = "".split(":"); // results in [""]
    String[] bunchOfNothing = ":".split(":"); // results in []
    
    More examples:
    
    input  | input.split(":")  | Splitter.on(':').split(input)
    =======|===================|==============================
    ""     | [""]              | [""]
    ":"    | []                | ["", ""]
    ":::"  | []                | ["", "", "", ""]
    "a:::" | ["a"]             | ["a", "", "", ""]
    ":::b" | ["", "", "", "b"] | ["", "", "", "b"]
    
    Tests and classes that are used by the GWT UI are not adapted.
    
    [1] http://konigsberg.blogspot.com/2009/11/final-thoughts-java-puzzler-splitting.html
    
    Change-Id: Ib9534727a9fe1840eecb86e4141ca3fe9d997936
    Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-02-09 21:52:39 +00:00
Edwin Kempin
49899c33c8 Update git submodules
* Update plugins/reviewnotes from branch 'master'
  to 467285664ebf8eb6f1e03ff13ebc706eee6d8662
  - HeaderFormatter: Remove unused appendChangeId method
    
    Change-Id: I0acf1ea301dfc02e3342e4942dffeb580cc86489
    Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-02-11 12:32:07 +00:00
Edwin Kempin
f1513ada38 Use ExternalId.isValidUsername instead of ExternalId.USER_NAME_PATTERN_REGEX
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>
2018-02-09 14:50:07 +01:00
Paladox none
a73fac82b1 Update git submodules
* 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
2018-02-05 21:23:00 +00:00
Paladox none
6b46d0e77b Update git submodules
* 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
2018-02-05 17:25:45 +00:00
Paladox none
fb67b760ee Update git submodules
* 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
2018-02-05 17:16:57 +00:00
Edwin Kempin
c89f32404c Move regular expressions for user name from Account to ExternalId
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>
2018-02-05 11:13:44 +01:00
Edwin Kempin
5c676582ad AccountCache: Rename maybeGet to get
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>
2018-02-05 09:18:37 +01:00
Edwin Kempin
913690c801 Update git submodules
* 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>
2018-02-02 12:40:12 +00:00
David Pursehouse
560ab56459 Update git submodules
* 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
2018-02-02 01:04:55 +00:00
David Pursehouse
d85e0f065c Update git submodules
* 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
2018-02-02 01:04:55 +00:00
David Pursehouse
fac9cd5299 Update git submodules
* 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
2018-01-31 23:33:39 +00:00
David Pursehouse
92be481972 Update git submodules
* 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
2018-01-31 23:33:39 +00:00
Kasper Nilsson
51daa2f431 Update git submodules
* 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
2018-01-30 16:49:26 +00:00
Kasper Nilsson
f0109bcb41 Update git submodules
* 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
2018-01-30 17:22:44 +00:00
Paladox none
9dd4814f65 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to 5d3c9d0a3b645fb626c76be799e3951f3caa976d
  - Re enable line numbers through preference
    
    Change-Id: I172dc86d7a19b23e97111751999dde7d601c1d8a
2018-01-30 17:22:44 +00:00
Paladox none
5ad4729f56 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to 4101254bd08bc1e553b82d1e11543639c26e6d6b
  - Move codemirror scripts and styles outside of the dom
    
    Bug: Issue 8239
    Change-Id: I661640c4aac188f172bd768996083b552ee6df95
2018-01-30 16:49:26 +00:00
Kasper Nilsson
331900dd34 Update git submodules
* Update plugins/codemirror-editor from branch 'master'
  to eedb7a4309bf7b59bded8e022078934f282fbdc0
  - Add golang syntax highlighting
    
    Change-Id: I858c0139f8f8ccce53f4d33dc1e3c4dc4b69d598
2018-01-29 18:48:07 +00:00
Edwin Kempin
ef120cd66d CurrentUser#getUserName: Return Optional<String> instead of nullable String
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>
2018-01-25 12:07:03 +01:00
Han-Wen Nienhuys
a76ca4a345 Move //lib:common-io to //lib/commons:io
Change-Id: I1bd002a0073acb44d0033b6b994eb1c5129c76ec
2018-01-24 15:21:30 +01:00
Patrick Hiesel
12e2fe9728 Merge "RefControl: Make project state checks in READ explicit"
* submodules:
* Update plugins/replication from branch 'master'
  to fa0a581fe76cb6adcf796052fe54da1a996bfcc5
  - Check explicitly if project state permits read
    
    Change-Id: I8bd880b02897b1a4efb36ad430e70465b924be68
2018-01-23 08:15:02 +00:00
Edwin Kempin
881431d714 Treat empty username as non-existing username
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>
2018-01-22 08:00:19 +01:00
Edwin Kempin
9cb0b0cb88 AccountState#getUserName: Return Optional<String> instead of nullable String
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>
2018-01-19 15:08:14 +01:00
Edwin Kempin
baeae020e5 Rename AccountCache#getOrNull to maybeGet and return Optional<AccountState>
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>
2018-01-19 15:06:57 +01:00
Edwin Kempin
f3ca67bbc4 Update singleusergroup plugin
* SingleUserGroup: Use AccountCache#getOrNull instead of AccountCache#get

Change-Id: I7b143b5eea2b20dc68288d933515009062a81dfe
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-01-19 15:05:24 +01:00
Edwin Kempin
de8ff6ae8f AccountCache#getByUsername: Return Optional<AccountState>
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>
2018-01-19 10:52:27 +01:00
David Ostrovsky
e1f11c7d96 Bazel: Export restapi library in plugin API
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
2018-01-18 06:45:46 +01:00
Kasper Nilsson
be93e9ce02 Update git submodules
* 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
2018-01-11 22:14:26 +00:00
Kasper Nilsson
b317cd12c7 Update git submodules
* 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
2018-01-03 23:13:27 +00:00
Kasper Nilsson
642ff2e3cc Revamp reply dialog overflow
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
2018-01-02 16:22:26 -08:00
Kasper Nilsson
398e2a57e6 Update git submodules
* 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
2018-01-02 19:03:07 +00:00
Kasper Nilsson
ea1293524c Update git submodules
* 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
2018-01-02 22:59:22 +00:00