Commit Graph

7212 Commits

Author SHA1 Message Date
René Pfeuffer
8a9b17a550 Fix overridden method annotations 2018-06-25 15:01:57 +02:00
René Pfeuffer
0c8ec1577a Remove unused fields 2018-06-25 14:54:20 +02:00
Johannes Schnatterer
4cb53930f6 Merge 2018-06-25 14:43:09 +02:00
Philipp Czora
3d450ece64 Merged changes 2018-06-25 14:30:07 +02:00
René Pfeuffer
3edd5877b8 Add unit tests for user deletion 2018-06-25 14:28:41 +02:00
René Pfeuffer
15acd69562 Add unit tests for user update 2018-06-25 14:16:20 +02:00
Philipp Czora
a85961ee57 Use constructor injection 2018-06-25 14:10:36 +02:00
Johannes Schnatterer
83c3372a0a Updates jacoco-maven-plugin.
Hoping for more accurate code coverage calculations.
2018-06-25 14:06:05 +02:00
René Pfeuffer
e156ef1964 Add unit tests for group resource 2018-06-25 14:05:25 +02:00
René Pfeuffer
0985f76a8a Add simple unit test 2018-06-25 13:28:55 +02:00
René Pfeuffer
0c88a03f27 Fix not found 2018-06-25 13:27:24 +02:00
René Pfeuffer
dda832775e Heed IntelliJ warning 2018-06-25 12:51:38 +02:00
René Pfeuffer
627eb8bd90 Add null check 2018-06-25 12:49:17 +02:00
René Pfeuffer
9d03a52ea0 Fix documentation and permission check 2018-06-25 12:45:16 +02:00
René Pfeuffer
83d6ab8e9c Backed out changeset 5d23ff274a2f 2018-06-25 11:52:36 +02:00
René Pfeuffer
9d250920f2 Format comment as a comment 2018-06-25 11:06:18 +02:00
René Pfeuffer
2ca7d708e6 Use JitPack as a workaround for edison hal bug 2018-06-25 10:49:21 +02:00
René Pfeuffer
fab44afcad Activate tests 2018-06-25 10:02:29 +02:00
René Pfeuffer
2d32b24e48 Extract base class for collection mappers 2018-06-25 09:57:59 +02:00
René Pfeuffer
f9a094e1b9 Use field variables 2018-06-25 09:40:18 +02:00
René Pfeuffer
51b2407ac4 Fix unit test 2018-06-25 09:37:25 +02:00
René Pfeuffer
c847f3d437 Format code 2018-06-25 09:31:07 +02:00
René Pfeuffer
b0f460c6b4 Merge 2018-06-25 09:25:31 +02:00
René Pfeuffer
c340fadba7 Advance to edison hal 2.0.0 2018-06-25 09:25:12 +02:00
Philipp Czora
20d6dd9b60 merge 2018-06-25 09:19:49 +02:00
Matt Harbison
405dd67275 ensure each message line printed in the Mercurial hook gets a trailing newline
I noticed that the exception printed in the previous commit started on the same
line as the print for the `str(e)` case right before it.  Since this also prints
the content of urllib2.URLError.read(), it seems better to remove any existing
newline and re-add it, than to just assume the `str(e)` case was the only
problem.
2018-06-22 16:42:05 -04:00
Matt Harbison
2d103b7f95 optionally print tracebacks when the Mercurial hook swallows an exception
If `ui.traceback=True` is set on the server, this prints the stacktrace for the
exception on the client side.  Otherwise, nothing happens.  I tried allowing the
exception to propagate back to Mercurial, but then the client sees this message
with 4.4.2 and 4.6.1:

    abort: remote error:
    Mercurial/Python process ends with return code 1

Something odd changed when upgrading from CentOS 7.4 to 7.5 around forwarding
requests from the loopback address that I don't fully understand.  First, we
were getting a ValueError from inside `opener.open()` saying that 'localhost'
didn't match the host listed in the SSL certificate.  That wasn't visible until
adding this.

Then what happened is a connection refused out of the same function, so the
traceback is added to the other handler too.  Running the equivalent command on
the command line from the 'vcs' host stopped working in 7.5:

  $ curl https://vcs.domain.com/hook/hg/?ping=true
  curl: (7) Failed connect to vcs.domain.com:443; Connection refused

But it works when run on another machine targeting that same 'vcs' host.  Adding
another firewall rule allows everything to work from the 'vcs' host again:

  $ iptables -t nat -I OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-ports 8443
2018-06-22 16:33:52 -04:00
Matt Harbison
a051eb159c #989 load global configuration in hgweb on Mercurial 4.1 and later 2018-06-22 16:06:35 -04:00
René Pfeuffer
5e61e7979b Fix test for pagination 2018-06-22 14:47:53 +02:00
Philipp Czora
2ad4b14fb0 Added custom JAX RS Filter priorities 2018-06-22 13:47:47 +02:00
René Pfeuffer
da0cb2a5a4 Move page object creation to PageResult class 2018-06-22 10:42:02 +02:00
René Pfeuffer
9ec3833a97 Add overall count to collection results 2018-06-22 10:15:35 +02:00
René Pfeuffer
2daad8aab7 Use provider for group sub resources 2018-06-22 08:33:45 +02:00
René Pfeuffer
5836688f30 Rename group resource classes 2018-06-22 08:28:18 +02:00
René Pfeuffer
ed1417b2ea Replace guice inject with javax 2018-06-22 08:18:43 +02:00
Johannes Schnatterer
b95066946e User resource: No longer check for admin role.
In SCMM v2 we use permissions. The checks are already implemented in
DefaultUserManager called by the resource.

When not authorized, the check results in an AuthorizationException,
which is mapped to 403.
As this is no longer realized in the resource, the corresponding test
is removed.
2018-06-21 14:50:55 +02:00
Johannes Schnatterer
ab290a78d9 User Root Resource: Use CDI Provider for subresources.
Resources are request scoped and we need only one sub resource per
request. That is, injecting all subresources (and their transitive
inejctions)in the constructor builds a lot of objects that are never
used.

Solution: Inject provider, that lazily inject the needed subresources
on demand.
2018-06-21 11:54:54 +02:00
Johannes Schnatterer
0df7156da0 Renames User resource classes 2018-06-21 10:24:02 +02:00
René Pfeuffer
26b3608c5d Merge with remote 2018-06-20 17:06:24 +02:00
René Pfeuffer
9d2d70f9df Simplify things 2018-06-20 16:08:51 +02:00
Philipp Czora
89322a0511 Cleanup 2018-06-20 14:45:55 +02:00
René Pfeuffer
7f19b5baff Fix typo 2018-06-20 11:11:14 +02:00
Philipp Czora
b93b291293 Implemented unit tests for Manager and added param checks 2018-06-15 14:36:22 +02:00
René Pfeuffer
d5e2899026 Format 2018-06-15 14:29:32 +02:00
René Pfeuffer
26190973bc Close branch 2.0.0-m3. 2018-06-15 12:18:24 +00:00
René Pfeuffer
5704099196 Move UriInfo to mappers 2018-06-15 13:01:58 +02:00
René Pfeuffer
b73349c741 Fix unit tests 2018-06-15 11:27:46 +02:00
René Pfeuffer
8a8858407d Use request scoped store to transfer UriInfo 2018-06-15 08:46:21 +02:00
René Pfeuffer
06bbeeb636 Get group collections 2018-06-14 11:39:02 +02:00
René Pfeuffer
004cc4e117 Test resource links 2018-06-14 11:18:26 +02:00