13423 Commits

Author SHA1 Message Date
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
René Pfeuffer
62759f798f Use class for resource links 2018-06-14 11:03:40 +02:00
René Pfeuffer
51579b2e55 Abstraction for LinkBuilder 2018-06-14 09:26:41 +02:00
René Pfeuffer
d2e2123cb4 Mob review: base class for mapper 2018-06-14 08:42:52 +02:00
René Pfeuffer
53690bf701 Mob review 2018-06-14 08:26:09 +02:00
René Pfeuffer
c50a3fb2e2 Remove unused function 2018-06-14 08:07:59 +02:00
René Pfeuffer
838777b403 Mob review 2018-06-14 08:05:29 +02:00
René Pfeuffer
b9f1a200fa Test roles 2018-06-13 14:07:43 +02:00
René Pfeuffer
384183f3a9 Remove outdated test case 2018-06-13 12:56:44 +02:00
René Pfeuffer
4a63f0a3de Use json file for test instead of embedded json 2018-06-13 12:49:29 +02:00
René Pfeuffer
8bfe6bacb0 Create endpoint for groups 2018-06-13 12:45:32 +02:00
René Pfeuffer
6dfd0353ce Do not map creation/modification dates on post 2018-06-13 11:04:56 +02:00
René Pfeuffer
b09bf67959 Implement group dto to entity mapping 2018-06-13 10:17:30 +02:00
René Pfeuffer
b94e83b334 Model members as embedded partial users 2018-06-13 08:56:49 +02:00
René Pfeuffer
781b30ed58 Remove redundant annotation 2018-06-13 07:46:45 +02:00
René Pfeuffer
853f8d6a45 Map members collection for groups 2018-06-12 08:18:29 +02:00
René Pfeuffer
470ebaff7e Implement base to read groups 2018-06-11 08:27:25 +02:00
Sebastian Sdorra
30c86d3291 reformat ScmAnnotationProcessor 2018-06-10 19:59:24 +02:00
Sebastian Sdorra
87c4a12d6b added missing default values to plugin.xml and module.xml 2018-06-10 19:51:03 +02:00