diff --git a/structurizr-dsl/src/main/java/com/structurizr/dsl/DslParserContext.java b/structurizr-dsl/src/main/java/com/structurizr/dsl/DslParserContext.java index f7f7491d..7fd4eea7 100644 --- a/structurizr-dsl/src/main/java/com/structurizr/dsl/DslParserContext.java +++ b/structurizr-dsl/src/main/java/com/structurizr/dsl/DslParserContext.java @@ -4,8 +4,8 @@ final class DslParserContext extends DslContext { - private boolean restricted; - private File file; + private final boolean restricted; + private final File file; DslParserContext(File file, boolean restricted) { this.file = file; diff --git a/structurizr-dsl/src/main/java/com/structurizr/dsl/WorkspaceParser.java b/structurizr-dsl/src/main/java/com/structurizr/dsl/WorkspaceParser.java index 7778007a..44f11b2c 100644 --- a/structurizr-dsl/src/main/java/com/structurizr/dsl/WorkspaceParser.java +++ b/structurizr-dsl/src/main/java/com/structurizr/dsl/WorkspaceParser.java @@ -46,6 +46,7 @@ Workspace parse(DslParserContext context, Tokens tokens) { } else { String dsl = content.getContent(); StructurizrDslParser structurizrDslParser = new StructurizrDslParser(); + structurizrDslParser.setRestricted(context.isRestricted()); structurizrDslParser.parse(context, dsl); workspace = structurizrDslParser.getWorkspace(); }