mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-04-19 18:16:44 +02:00
commit
7e96479136
@ -13,6 +13,7 @@ function die (msg)
|
|||||||
fail(msg)
|
fail(msg)
|
||||||
debug.traceback=nil
|
debug.traceback=nil
|
||||||
error("Permission denied")
|
error("Permission denied")
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check if the sysdb is create, otherwise create the table
|
-- check if the sysdb is create, otherwise create the table
|
||||||
@ -33,7 +34,7 @@ function is_auth()
|
|||||||
local data = db:find(cond)
|
local data = db:find(cond)
|
||||||
--print(JSON.encode(data))
|
--print(JSON.encode(data))
|
||||||
db:close()
|
db:close()
|
||||||
if data == nil or data[1] == nil then die(msg) end
|
if data == nil or data[1] == nil then return die("No user data found") end
|
||||||
-- next time check the stamp
|
-- next time check the stamp
|
||||||
SESSION.user = data[1].username
|
SESSION.user = data[1].username
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user