Skip to content

Commit

Permalink
EditorAuthorizationFilter change regex pattern in order to match the …
Browse files Browse the repository at this point in the history
…whole path
  • Loading branch information
mike-podolskiy90 committed Nov 7, 2019
1 parent 4af756f commit 9b08cfc
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -32,7 +32,7 @@ public class EditorAuthorizationFilter implements ContainerRequestFilter {

private static final Logger LOG = LoggerFactory.getLogger(EditorAuthorizationFilter.class);

private static final String ENTITY_KEY = "^%s/([a-f0-9-]+)";
private static final String ENTITY_KEY = "^/?%s/([a-f0-9-]+).*";
private static final Pattern NODE_NETWORK_PATTERN = Pattern.compile(String.format(ENTITY_KEY, "(?:network|node)"));
private static final Pattern ORGANIZATION_PATTERN = Pattern.compile(String.format(ENTITY_KEY, "organization"));
private static final Pattern DATASET_PATTERN = Pattern.compile(String.format(ENTITY_KEY, "dataset"));
Expand Down

0 comments on commit 9b08cfc

Please sign in to comment.