diff options
Diffstat (limited to 'acf/model/permission.lua')
-rw-r--r-- | acf/model/permission.lua | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/acf/model/permission.lua b/acf/model/permission.lua deleted file mode 100644 index 271d478..0000000 --- a/acf/model/permission.lua +++ /dev/null @@ -1,22 +0,0 @@ ---[[ -Copyright (c) 2012-2013 Kaarle Ritvanen -See LICENSE file for license details ---]] - -local M = {} - -local insert = require('acf.model.node').insert -local start_txn = require('acf.transaction') - -function M.define(path, ...) - local txn = start_txn() - local db = txn:fetch('/auth/permissions') - for _, permission in ipairs{...} do insert(db, permission..path) end - txn:commit() -end - -function M.defaults(path) - M.define(path, 'read', 'create', 'modify', 'delete') -end - -return M |