summaryrefslogtreecommitdiffstats
path: root/app/acf-util
diff options
context:
space:
mode:
Diffstat (limited to 'app/acf-util')
-rw-r--r--app/acf-util/password-listlockevents-html.lsp8
-rw-r--r--app/acf-util/password-model.lua14
-rw-r--r--app/acf-util/roles-model.lua6
-rw-r--r--app/acf-util/roles-read-html.lsp2
4 files changed, 15 insertions, 15 deletions
diff --git a/app/acf-util/password-listlockevents-html.lsp b/app/acf-util/password-listlockevents-html.lsp
index bb81846..aff2aba 100644
--- a/app/acf-util/password-listlockevents-html.lsp
+++ b/app/acf-util/password-listlockevents-html.lsp
@@ -1,4 +1,4 @@
-<% local view, viewlibrary, page_info, session = ...
+<% local view, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
@@ -8,7 +8,7 @@ html = require("acf.html")
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
}
</script>
-
+
<script type="text/javascript">
if (typeof $.tablesorter == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
@@ -36,7 +36,7 @@ html = require("acf.html")
<th>User ID</th>
<th>IP Address</th>
<th>Time</th>
- </tr>
+ </tr>
</thead><tbody>
<% for i,lock in ipairs( view.value ) do %>
<tr>
@@ -48,7 +48,7 @@ html = require("acf.html")
</tbody></table>
<% htmlviewfunctions.displaysectionend(header_level) %>
-<% if viewlibrary and viewlibrary.dispatch_component then
+<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("unlockuser")
viewlibrary.dispatch_component("unlockip")
end %>
diff --git a/app/acf-util/password-model.lua b/app/acf-util/password-model.lua
index 72ae416..6644841 100644
--- a/app/acf-util/password-model.lua
+++ b/app/acf-util/password-model.lua
@@ -10,10 +10,10 @@ local weak_password = function(password)
-- If password is too short, return false
if (#password < 4) then
return true, "Password is too short!"
- end
+ end
if (tonumber(password)) then
return true, "Password can't contain only numbers!"
- end
+ end
return false, nil
end
@@ -49,7 +49,7 @@ end
local function get_blank_user(self)
local result = cfe({ type="group", value={}, label="User Account" })
-
+
if not avail_roles then
avail_roles = roles.list_all_roles(self)
for x,role in ipairs(avail_roles) do
@@ -59,7 +59,7 @@ local function get_blank_user(self)
end
end
end
-
+
-- Call into skins controller to get the list of skins
if not avail_skins then
avail_skins = {""}
@@ -123,7 +123,7 @@ end
function mymodule.update_user(self, settings, submit, create)
local success, settings = validate_settings(settings, create)
-
+
if success then
local userinfo = authenticator.get_userinfo(self, settings.value.userid.value)
if userinfo and create then
@@ -182,7 +182,7 @@ end
function mymodule.read_user_without_roles(self, clientdata)
local result = mymodule.read_user(self, clientdata)
-
+
-- We don't allow a user to modify his own roles
-- Since they can't modify roles, we should restrict the available options for home
result.value.home.option = {""}
@@ -203,7 +203,7 @@ function mymodule.get_users(self)
local users = {}
local userlist = authenticator.list_users(self)
table.sort(userlist)
-
+
for x,user in pairs(userlist) do
users[#users+1] = get_user(self, user)
end
diff --git a/app/acf-util/roles-model.lua b/app/acf-util/roles-model.lua
index 8b51503..0e49b4e 100644
--- a/app/acf-util/roles-model.lua
+++ b/app/acf-util/roles-model.lua
@@ -17,7 +17,7 @@ end
mymodule.get_role_perms = function(self, role)
return cfe({ type="structure", value=roles.get_role_perm(self, role), label="Permissions" })
end
-
+
-- Return list of all permissions
mymodule.get_perms_list = function(self)
return cfe({ type="structure", value=roles.get_all_permissions(self), label="All Permissions" })
@@ -37,7 +37,7 @@ mymodule.getpermissions = function(self, clientdata)
local tmp, all_perms = roles.get_all_permissions(self)
table.sort(all_perms)
local my_perms = {}
- local default_perms = {}
+ local default_perms = {}
if clientdata.role then
role_cfe.readonly = true
@@ -62,7 +62,7 @@ mymodule.getpermissions = function(self, clientdata)
all_perms = newall
end
end
-
+
local permissions_cfe = cfe({ type="multi", value=my_perms, option=all_perms, label="Role permissions", seq=2 })
return cfe({ type="structure", value={role=role_cfe, permissions=permissions_cfe} })
diff --git a/app/acf-util/roles-read-html.lsp b/app/acf-util/roles-read-html.lsp
index 87772b7..79700cf 100644
--- a/app/acf-util/roles-read-html.lsp
+++ b/app/acf-util/roles-read-html.lsp
@@ -72,7 +72,7 @@ end %>
end
%>
</tbody></table>
-<%
+<%
if view.value.userid or view.value.role then
htmlviewfunctions.displaysectionend(header_level2)
end