summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-05-30 20:08:26 +0000
committerTed Trask <ttrask01@yahoo.com>2013-05-30 20:08:26 +0000
commit2d34b61db1eb8f4f59ee22907c98a911eddcee9f (patch)
tree6ab9c6cafcc83083c0a43603613e8c590f92895e /app
parentd2dcdd318768ba7e0ddc06afee908c85ba8b98cd (diff)
downloadacf-core-2d34b61db1eb8f4f59ee22907c98a911eddcee9f.tar.bz2
acf-core-2d34b61db1eb8f4f59ee22907c98a911eddcee9f.tar.xz
Change logon/logout action to logon/logoff and standardize on logon/off instead of login/out
Diffstat (limited to 'app')
-rw-r--r--app/acf-util/acf-util.roles4
-rw-r--r--app/acf-util/logon-controller.lua10
-rw-r--r--app/acf-util/logon-model.lua10
-rw-r--r--app/acf-util/password-controller.lua2
-rw-r--r--app/acf_www-controller.lua2
-rw-r--r--app/template-html.lsp6
6 files changed, 17 insertions, 17 deletions
diff --git a/app/acf-util/acf-util.roles b/app/acf-util/acf-util.roles
index c2639cf..8741022 100644
--- a/app/acf-util/acf-util.roles
+++ b/app/acf-util/acf-util.roles
@@ -1,4 +1,4 @@
-GUEST=logon/logon,logon/logout,logon/status,welcome/read
+GUEST=logon/logon,logon/logoff,logon/status,welcome/read
USER=password/editme,roles/read
EXPERT=
-ADMIN=logon/logon,logon/logout,logon/status,password/editme,password/status,password/edituser,password/newuser,password/deleteuser,roles/read,roles/getpermslist,roles/viewuserroles,roles/viewroleperms,roles/viewroles,roles/editrole,roles/deleterole,roles/newrole,welcome/read,password/status,password/edituser,password/newuser,password/deleteuser,roles/getpermslist,roles/viewuserroles,roles/viewroleperms,roles/viewroles,roles/editrole,roles/deleterole,roles/newrole,skins/read,skins/update
+ADMIN=logon/logon,logon/logoff,logon/status,password/editme,password/status,password/edituser,password/newuser,password/deleteuser,roles/read,roles/getpermslist,roles/viewuserroles,roles/viewroleperms,roles/viewroles,roles/editrole,roles/deleterole,roles/newrole,welcome/read,password/status,password/edituser,password/newuser,password/deleteuser,roles/getpermslist,roles/viewuserroles,roles/viewroleperms,roles/viewroles,roles/editrole,roles/deleterole,roles/newrole,skins/read,skins/update
diff --git a/app/acf-util/logon-controller.lua b/app/acf-util/logon-controller.lua
index 5404dbd..6ac293e 100644
--- a/app/acf-util/logon-controller.lua
+++ b/app/acf-util/logon-controller.lua
@@ -61,15 +61,15 @@ logon = function(self)
return cmdresult
end
--- Log out current user and go to login screen
-logout = function(self)
- local logout = self.model.logoff(conf.sessiondir, sessiondata)
+-- Log off current user and go to logon screen
+logoff = function(self)
+ local logoff = self.model.logoff(conf.sessiondir, sessiondata)
-- We have to redirect so a new session / menu is created
redirect(self, "logon")
- return logout
+ return logoff
end
--- Report the login status
+-- Report the logon status
status = function(self)
local name = cfe({ label="User Name" })
local sessionid = cfe({ value=self.sessiondata.id or "", label="Session ID" })
diff --git a/app/acf-util/logon-model.lua b/app/acf-util/logon-model.lua
index 40a533e..833d665 100644
--- a/app/acf-util/logon-model.lua
+++ b/app/acf-util/logon-model.lua
@@ -22,9 +22,9 @@ logoff = function (sessiondir, sessiondata)
end
-- Log on new user if possible and set up userinfo in session
--- if we fail, we leave the session alone (don't log out)
+-- if we fail, we leave the session alone (don't log off)
logon = function (self, userid, password, ip_addr, sessiondir, sessiondata)
- -- Check to see if we can login this user id / ip addr
+ -- Check to see if we can log on this user id / ip addr
local countevent = session.count_events(sessiondir, userid, session.hash_ip_addr(ip_addr), self.conf.lockouttime, self.conf.lockouteventlimit)
if countevent then
session.record_event(sessiondir, userid, session.hash_ip_addr(ip_addr))
@@ -32,9 +32,9 @@ logon = function (self, userid, password, ip_addr, sessiondir, sessiondata)
if false == countevent and userid and password then
if authenticator.authenticate (self, userid, password) then
- -- We have a successful login, change sessiondata
+ -- We have a successful logon, change sessiondata
-- for some reason, can't call this function or it skips rest of logon
- -- logout(sessiondir, sessiondata)
+ -- logoff(sessiondir, sessiondata)
---[[ so, do this instead
session.unlink_session(sessiondir, sessiondata.id)
-- Clear the current session data
@@ -50,7 +50,7 @@ logon = function (self, userid, password, ip_addr, sessiondir, sessiondata)
end
return cfe({ type="boolean", value=true, label="Logon Success" })
else
- -- We have a bad login, log the event
+ -- We have a bad logon, log the event
session.record_event(sessiondir, userid, session.hash_ip_addr(ip_addr))
end
end
diff --git a/app/acf-util/password-controller.lua b/app/acf-util/password-controller.lua
index c3d8695..6518249 100644
--- a/app/acf-util/password-controller.lua
+++ b/app/acf-util/password-controller.lua
@@ -18,7 +18,7 @@ function editme(self)
local tmp1, tmp2 = roles.get_roles_perm(self, value.value.roles.value)
table.sort(tmp2)
for i,h in ipairs(tmp2) do
- if h ~= "/acf-util/logon/logout" and h ~= "/acf-util/logon/logon" then
+ if h ~= "/acf-util/logon/logoff" and h ~= "/acf-util/logon/logon" then
value.value.home.option[#value.value.home.option+1] = h
end
end
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index 91872cb..2ff2179 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -272,7 +272,7 @@ mvc.on_load = function (self, parent)
self.sessiondata.id = sessionlib.random_hash(512)
require("authenticator")
self.sessiondata.userinfo = authenticator.get_userinfo(self, ENV.REMOTE_USER)
- logevent("Automatic login as ENV.REMOTE_USER: "..tostring(ENV.REMOTE_USER))
+ logevent("Automatic logon as ENV.REMOTE_USER: "..tostring(ENV.REMOTE_USER))
end
if nil == self.sessiondata.id then
diff --git a/app/template-html.lsp b/app/template-html.lsp
index 811a771..34bc824 100644
--- a/app/template-html.lsp
+++ b/app/template-html.lsp
@@ -58,9 +58,9 @@ end
<% local ctlr = pageinfo.script .. "/acf-util/logon/"
if session.userinfo and session.userinfo.userid then
- io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. html.html_escape(session.userinfo.userid) .. "'</a>\n", html.html_escape(ctlr) .. "logout" ) )
+ io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log off as '" .. html.html_escape(session.userinfo.userid) .. "'</a>\n", html.html_escape(ctlr) .. "logoff" ) )
else
- io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log in</a>\n", html.html_escape(ctlr) .. "logon" ) )
+ io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log on</a>\n", html.html_escape(ctlr) .. "logon" ) )
end %>
|
<a href="<%= html.html_escape(pageinfo.wwwprefix) %>/">home</a> |
@@ -108,7 +108,7 @@ end
</div>
<h2><%= html.html_escape(pageinfo.controller) %> : <%= html.html_escape(pageinfo.action) %></h2>
<!-- FIXME: Next row is 'dead' data! Remove 'class=hide' when done! -->
- <p class='hide'>[ welcome ] > [ login ] > [ bgp ] > [ firewall ] > [ content filter ] > [ interfaces ]</p>
+ <p class='hide'>[ welcome ] > [ logon ] > [ bgp ] > [ firewall ] > [ content filter ] > [ interfaces ]</p>
<div class="tailer">
</div>
</div> <!-- postnav -->