Merge with fix

This commit is contained in:
René Pfeuffer
2018-10-02 09:55:38 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -9,6 +9,6 @@ public final class ValidationConstraints {
* and it not contains whitespaces * and it not contains whitespaces
* and the characters: . - _ @ are allowed * and the characters: . - _ @ are allowed
*/ */
public static final String USER_GROUP_PATTERN = "^[^@\\s][A-Za-z0-9\\.\\-_@]+$"; public static final String USER_GROUP_PATTERN = "^[A-Za-z0-9\\.\\-_][A-Za-z0-9\\.\\-_@]+$";
} }

View File

@@ -71,7 +71,7 @@ public class PermissionRootResource {
@TypeHint(TypeHint.NO_CONTENT.class) @TypeHint(TypeHint.NO_CONTENT.class)
@Consumes(VndMediaType.PERMISSION) @Consumes(VndMediaType.PERMISSION)
@Path("") @Path("")
public Response create(@PathParam("namespace") String namespace, @PathParam("name") String name,@Valid PermissionDto permission) throws Exception { public Response create(@PathParam("namespace") String namespace, @PathParam("name") String name,@Valid PermissionDto permission) throws AlreadyExistsException, NotFoundException {
log.info("try to add new permission: {}", permission); log.info("try to add new permission: {}", permission);
Repository repository = load(namespace, name); Repository repository = load(namespace, name);
RepositoryPermissions.permissionWrite(repository).check(); RepositoryPermissions.permissionWrite(repository).check();