[FIX] Launcher permissions

This commit is contained in:
Gravita 2022-12-05 23:17:12 +07:00
parent a0722fb5f4
commit 3c5e25b67f

View file

@ -44,6 +44,7 @@ public void execute(ChannelHandlerContext ctx, Client clientData) throws Excepti
server.authHookManager.preHook.hook(context, clientData); server.authHookManager.preHook.hook(context, clientData);
context.report = server.authManager.auth(context, password); context.report = server.authManager.auth(context, password);
server.authHookManager.postHook.hook(context, clientData); server.authHookManager.postHook.hook(context, clientData);
result.permissions = context.report.session() != null ? (context.report.session().getUser() != null ? context.report.session().getUser().getPermissions() : null) : null;
if (context.report.isUsingOAuth()) { if (context.report.isUsingOAuth()) {
result.oauth = new AuthRequestEvent.OAuthRequestEvent(context.report.oauthAccessToken(), context.report.oauthRefreshToken(), context.report.oauthExpire()); result.oauth = new AuthRequestEvent.OAuthRequestEvent(context.report.oauthAccessToken(), context.report.oauthRefreshToken(), context.report.oauthExpire());
} }