summaryrefslogtreecommitdiffstats
path: root/did-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-10-28 23:27:00 +0000
committerTed Trask <ttrask01@yahoo.com>2012-10-28 23:27:00 +0000
commit93311d21c48b30124f39c82304cc7c5fff251373 (patch)
tree501c6acb276975b1e928b425e8e936ff14099998 /did-model.lua
parent8c2dc86dc5e0d8519bbacf0d5e3a24c755831792 (diff)
downloadacf-did-93311d21c48b30124f39c82304cc7c5fff251373.tar.bz2
acf-did-93311d21c48b30124f39c82304cc7c5fff251373.tar.xz
Removed unneeded views by updating CFE for autoview
Diffstat (limited to 'did-model.lua')
-rw-r--r--did-model.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/did-model.lua b/did-model.lua
index a043060..dd77d36 100644
--- a/did-model.lua
+++ b/did-model.lua
@@ -1173,8 +1173,8 @@ end
function getnewdatabase()
local database = {}
local errtxt
- database.password = cfe({ label="Password" })
- database.password_confirm = cfe({ label="Password (confirm)" })
+ database.password = cfe({ type="password", label="Password", seq=1 })
+ database.password_confirm = cfe({ type="password", label="Password (confirm)", seq=2 })
local test = testdatabase()
if test.value then
errtxt = "Database already exists!"
@@ -1341,9 +1341,10 @@ function getuserpermissions(self, userid)
local entry = auth.read_entry(self, authenticator.usertable, self.conf.prefix..self.conf.controller, userid) or ""
local restricted, allowedlist
restricted, allowedlist = parseentry(entry)
- local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line" })
- local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions" })
- local user = cfe({ value=userid, label="User Name" })
+ local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line", seq=3 })
+ local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions", seq=2 })
+ local user = cfe({ value=userid or "", label="User Name", seq=1 })
+ if userid then user.readonly=true end
local output = cfe({ type="group", value={userid=user, allowed=allowed, restricted=restrict}, label="DID Permissions" })
validateuserpermissions(self, output)
return output
@@ -1366,9 +1367,10 @@ function getrolepermissions(self, role)
local entry = auth.read_entry(self, authenticator.roletable, self.conf.prefix..self.conf.controller, role) or ""
local restricted, allowedlist
restricted, allowedlist = parseentry(entry)
- local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line" })
- local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions" })
- local rol = cfe({ value=role, label="Role" })
+ local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line", seq=3 })
+ local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions", seq=2 })
+ local rol = cfe({ value=role or "", label="Role", seq=1 })
+ if role then rol.readonly=true end
local output = cfe({ type="group", value={role=rol, allowed=allowed, restricted=restrict}, label="DID Permissions" })
validaterolepermissions(self, output)
return output