summaryrefslogtreecommitdiffstats
path: root/aconf/model
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-03-25 09:19:21 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-03-25 09:27:31 +0200
commit23613ea3bc6ca862c876d701c689ec8b92efaefa (patch)
treef3541eebc3936f346b87f0776cc625c7627c50bf /aconf/model
parent54861e9f2546d5d1b07795992c99f69e9608118c (diff)
downloadaconf-23613ea3bc6ca862c876d701c689ec8b92efaefa.tar.bz2
aconf-23613ea3bc6ca862c876d701c689ec8b92efaefa.tar.xz
model: dedicated file for audit trail
Diffstat (limited to 'aconf/model')
-rw-r--r--aconf/model/aaa.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/aconf/model/aaa.lua b/aconf/model/aaa.lua
index f956d9e..203b85c 100644
--- a/aconf/model/aaa.lua
+++ b/aconf/model/aaa.lua
@@ -10,6 +10,9 @@ local object = require('aconf.object')
local digest = require('crypto').digest
+local conf_addr = '/json'..require('posix').getcwd()..'/config'
+
+
local Role = M.new()
Role.permissions = M.Set{type=M.Reference{scope='../../../permissions'}}
@@ -77,7 +80,11 @@ Aaa.users = M.Collection{type=User}
Aaa.roles = M.Collection{type=Role}
Aaa.permissions = M.Set{type=M.String, addr='/volatile/aaa/permissions'}
Aaa.audit_trail = M.List{
- type=Record, editable=false, ui_name='Audit trail', ui_member='Record'
+ type=Record,
+ addr=conf_addr..'/audit.json',
+ editable=false,
+ ui_name='Audit trail',
+ ui_member='Record'
}
Aaa.action_log = M.List{type=Record, addr=node.null_addr, visible=false}
@@ -90,12 +97,6 @@ function Aaa:validate()
end
-M.register(
- 'aaa',
- Aaa,
- {
- addr='/json'..require('posix').getcwd()..'/config/aaa.json', ui_name='AAA'
- }
-)
+M.register('aaa', Aaa, {addr=conf_addr..'/auth.json', ui_name='AAA'})
M.permission.defaults('/aaa')