X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/954e17ad20c2d086cf1f2af1b4204b2b5d0815d3..de5351c7e5e91a5a055127e7294419c64a1c74df:/src/plugins/apache.sml diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index 132f479..62615af 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -22,12 +22,14 @@ structure Apache :> APACHE = struct open Ast +fun webNode node = + List.exists (fn (x, _) => x = node) Config.Apache.webNodes_all + orelse (Domain.hasPriv "www" + andalso List.exists (fn (x, _) => x = node) Config.Apache.webNodes_admin) + val _ = Env.type_one "web_node" Env.string - (fn node => - List.exists (fn (x, _) => x = node) Config.Apache.webNodes_all - orelse (Domain.hasPriv "www" - andalso List.exists (fn (x, _) => x = node) Config.Apache.webNodes_admin)) + webNode val _ = Env.registerFunction ("web_node_to_node", fn [e] => SOME e