diff options
Diffstat (limited to 'aconf/model/permission.lua')
-rw-r--r-- | aconf/model/permission.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/aconf/model/permission.lua b/aconf/model/permission.lua index f7f5be1..8ddd144 100644 --- a/aconf/model/permission.lua +++ b/aconf/model/permission.lua @@ -1,8 +1,9 @@ --[[ -Copyright (c) 2012-2014 Kaarle Ritvanen +Copyright (c) 2012-2015 Kaarle Ritvanen See LICENSE file for license details --]] +--- @module aconf.model local M = {} local node = require('aconf.model.node') @@ -15,6 +16,9 @@ function M.define(path, ...) txn:commit() end +--- create default permissions (read, create, modify, delete) for a given path. +-- @function permission.defaults +-- @tparam string path path to create the permissions for function M.defaults(path) M.define(path, 'read', 'create', 'modify', 'delete') for _, action in ipairs(node.meta(start_txn():fetch(path)).actions or {}) do |