summaryrefslogtreecommitdiffstats
path: root/aconf/model/permission.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-02 16:34:13 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-03 00:45:53 +0300
commit3baaf91de453d35b095881478be8d88b3fc2b97a (patch)
treedbeeedc851f0d8130907574ef8506904c5c44570 /aconf/model/permission.lua
parentc7bce46f22ff9c41e3598d42400368d3c733316c (diff)
downloadaconf-3baaf91de453d35b095881478be8d88b3fc2b97a.tar.bz2
aconf-3baaf91de453d35b095881478be8d88b3fc2b97a.tar.xz
initial developer documentation
descriptions for all functions and classes used by the openssh module
Diffstat (limited to 'aconf/model/permission.lua')
-rw-r--r--aconf/model/permission.lua6
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