summaryrefslogtreecommitdiffstats
path: root/aconf/model
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/model')
-rw-r--r--aconf/model/node.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/aconf/model/node.lua b/aconf/model/node.lua
index b4fd685..80f1de0 100644
--- a/aconf/model/node.lua
+++ b/aconf/model/node.lua
@@ -70,7 +70,14 @@ function M.TreeNode:init(context, params)
if not (mt.txn and mt.txn.user) then mt.privileged = true end
mt.escalate = mt.privileged and self or mt.class(
- setdefaults({privileged=true}, context), params
+ setdefaults(
+ {
+ parent=mt.parent and getmetatable(mt.parent).escalate,
+ privileged=true
+ },
+ context
+ ),
+ params
)
function mt.get(k, options) return mt.load(k, options) end