luci-base: implement session handling in luci.model.uci
authorJo-Philipp Wich <jo@mein.io>
Thu, 19 Apr 2018 09:42:12 +0000 (11:42 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 19 Apr 2018 09:42:12 +0000 (11:42 +0200)
commit9b22c9c1e1290f077297b14b835b3b9085b48bde
treec55a9316a5d8aedead610408315f6835d30510fb
parentfc8f825e2f6fedcc149fb3aafd7f6aa3eb4dcad7
luci-base: implement session handling in luci.model.uci

Introduce luci.model.uci.set_session_id() and luci.model.uci.get_session_id()
to set and get the effective session ID respectively.

When a session ID is set, it is sent as `ubus_rpc_session` attribute to rpcd,
causing it to use per-session change directories, isolating LuCI changes from
the global system uci state.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/model/uci.lua
modules/luci-base/luasrc/model/uci.luadoc