core/sessionmanager.lua
changeset 10646 de90b2f5da8c
parent 10382 04c4750ff8d2
child 11522 3f1a865e9419
--- a/core/sessionmanager.lua	Wed Feb 05 17:41:40 2020 +0000
+++ b/core/sessionmanager.lua	Wed Feb 05 17:56:20 2020 +0000
@@ -122,13 +122,14 @@
 	retire_session(session);
 end
 
-local function make_authenticated(session, username)
+local function make_authenticated(session, username, scope)
 	username = nodeprep(username);
 	if not username or #username == 0 then return nil, "Invalid username"; end
 	session.username = username;
 	if session.type == "c2s_unauthed" then
 		session.type = "c2s_unbound";
 	end
+	session.auth_scope = scope;
 	session.log("info", "Authenticated as %s@%s", username, session.host or "(unknown)");
 	return true;
 end