Comparison

util/session.lua @ 12640:999b1c59af6f

util.session: Add role management methods
author Matthew Wild <mwild1@gmail.com>
date Wed, 15 Jun 2022 11:37:09 +0100
parent 10110:3fa3872588a8
child 12975:d10957394a3c
comparison
equal deleted inserted replaced
12638:a47af78a9347 12640:999b1c59af6f
55 return true; 55 return true;
56 end 56 end
57 return session; 57 return session;
58 end 58 end
59 59
60 local function set_role(session, role)
61 session.role = role;
62 end
63
60 return { 64 return {
61 new = new_session; 65 new = new_session;
66
62 set_id = set_id; 67 set_id = set_id;
63 set_logger = set_logger; 68 set_logger = set_logger;
64 set_conn = set_conn; 69 set_conn = set_conn;
65 set_send = set_send; 70 set_send = set_send;
71 set_role = set_role;
66 } 72 }