Git Plugin Config: Create fine-grained configuration permissions.

No more hard-coded isAdmin() checks.
Also adds more tests.
This commit is contained in:
Johannes Schnatterer
2018-08-01 16:21:05 +02:00
parent 86af96bd83
commit aed70d3544
10 changed files with 114 additions and 56 deletions

View File

@@ -64,7 +64,7 @@ public class ConfigResource {
@Path("")
@Consumes(VndMediaType.CONFIG)
@StatusCodes({
@ResponseCode(code = 201, condition = "update success"),
@ResponseCode(code = 204, condition = "update success"),
@ResponseCode(code = 401, condition = "not authenticated / invalid credentials"),
@ResponseCode(code = 403, condition = "not authorized, the current user has no privileges to update the global config"),
@ResponseCode(code = 500, condition = "internal server error")