blob: 9a6d1d433a92b1fae668171627255ea405ab183c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--[[
Copyright (c) 2012-2013 Kaarle Ritvanen
See LICENSE file for license details
--]]
module(..., package.seeall)
local add = require('acf.model.set').add
local start = require('acf.transaction').start
function define(path, ...)
local txn = start()
local db = txn:search('/auth/permissions')
for _, permission in ipairs(arg) do add(db, permission..path) end
txn:commit()
end
function defaults(path) define(path, 'read', 'create', 'modify', 'update') end
|