diff options
Diffstat (limited to 'app/acf-util')
-rw-r--r-- | app/acf-util/password-controller.lua | 7 | ||||
-rw-r--r-- | app/acf-util/roles-controller.lua | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/app/acf-util/password-controller.lua b/app/acf-util/password-controller.lua index 37e5ced..336f6f4 100644 --- a/app/acf-util/password-controller.lua +++ b/app/acf-util/password-controller.lua @@ -1,5 +1,4 @@ module(..., package.seeall) -require("controllerfunctions") require("roles") default_action = "editme" @@ -11,7 +10,7 @@ end function editme(self) -- just to make sure can't modify any other user from this action self.clientdata.userid = self.sessiondata.userinfo.userid - return controllerfunctions.handle_form(self, function() + return self.handle_form(self, function() local value = self.model.read_user(self, self.sessiondata.userinfo.userid) -- 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 @@ -44,7 +43,7 @@ function editme(self) end function edituser(self) - return controllerfunctions.handle_form(self, function() + return self.handle_form(self, function() return self.model.read_user(self, self.clientdata.userid) end, function(value) -- If password and password_confirm are blank, don't set them @@ -65,7 +64,7 @@ function edituser(self) end function newuser(self) - return controllerfunctions.handle_form(self, function() + return self.handle_form(self, function() return self.model.read_user(self) end, function(value) return self.model.create_user(self, value) diff --git a/app/acf-util/roles-controller.lua b/app/acf-util/roles-controller.lua index 27ddef7..adf4b23 100644 --- a/app/acf-util/roles-controller.lua +++ b/app/acf-util/roles-controller.lua @@ -1,7 +1,6 @@ -- Roles/Group functions module (..., package.seeall) -require("controllerfunctions") default_action = "read" @@ -44,14 +43,14 @@ viewroles = function(self) end newrole = function(self) - return controllerfunctions.handle_form(self, + return self.handle_form(self, function() return self.model.getpermissions(self) end, function(value) return self.model.setpermissions(self, value, true) end, self.clientdata, "Create", "Create New Role", "New Role Created") end editrole = function(self) - return controllerfunctions.handle_form(self, + return self.handle_form(self, function() return self.model.getpermissions(self, self.clientdata.role) end, function(value) return self.model.setpermissions(self, value, false) end, self.clientdata, "Save", "Edit Role", "Role Saved") |