diff options
author | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-20 14:32:07 +0000 |
---|---|---|
committer | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-20 14:32:07 +0000 |
commit | 520ba28e7a281a39adc916687cb5428846f48421 (patch) | |
tree | b588c14dbd8966a8857954b6c8bd6f9a8f91233c /app/acf-util/password-model.lua | |
parent | fc77423bf44b0849897131384b7db0821062c9e2 (diff) | |
download | acf-core-520ba28e7a281a39adc916687cb5428846f48421.tar.bz2 acf-core-520ba28e7a281a39adc916687cb5428846f48421.tar.xz |
Removed built-in users alpine and foo from core, and instead redirect to create new user when none exist.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1738 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'app/acf-util/password-model.lua')
-rwxr-xr-x | app/acf-util/password-model.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/acf-util/password-model.lua b/app/acf-util/password-model.lua index 87c2e6f..fb06fae 100755 --- a/app/acf-util/password-model.lua +++ b/app/acf-util/password-model.lua @@ -7,7 +7,17 @@ function create_user(self, userdata) end function read_user(self, user) - return authenticator.get_userinfo(self, user) + local retval = authenticator.get_userinfo(self, user) + if not user then + local userlist = authenticator.list_users(self) + if #userlist == 0 then + -- There are no users yet, suggest some values + retval.value.userid.value = "root" + retval.value.username.value = "Admin account" + retval.value.roles.value = {"ADMIN"} + end + end + return retval end function update_user(self, userdata) |