Skip to content

Commit

Permalink
[#15]
Browse files Browse the repository at this point in the history
update generated regex to include `/` if not included
  • Loading branch information
jj committed Feb 27, 2019
1 parent 6570a4e commit 3f2f17f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class JPAMetadataResolverServiceImpl implements MetadataResolverService {
private String generateJavaScriptRegexScript(String regex) {
return """
"use strict";
${regex}.test(input.getEntityID());\n"""
${regex.startsWith('/') ? '' : '/'}${regex}${regex.endsWith('/') ? '' : '/'}.test(input.getEntityID());\n"""
}

void constructXmlNodeForFilter(EntityRoleWhiteListFilter filter, def markupBuilderDelegate) {
Expand Down

0 comments on commit 3f2f17f

Please sign in to comment.