The server.run() function modifies the server.state object to setup the owner at start. Unfortunately, the modifications are taking place inside the scope of a function and so the actual global state object is not being updated properly. I believe this is causing an issue where the admin role is not being persistently attached to the owner user in all cases.
How was this tested?
I've tested this locally to make sure the server still works at expected. Unfortunately I haven't been able to reproduce the bug that I suspect this change will fix, and so I can't confirm that this will indeed fix the issue. I feel pretty confident that the server.run() function should be modifying the global state object in any case.
Checklist
[x] Have you updated the VERSION file (if applicable)?
What and why?
The server.run() function modifies the server.state object to setup the owner at start. Unfortunately, the modifications are taking place inside the scope of a function and so the actual global state object is not being updated properly. I believe this is causing an issue where the admin role is not being persistently attached to the owner user in all cases.
How was this tested?
I've tested this locally to make sure the server still works at expected. Unfortunately I haven't been able to reproduce the bug that I suspect this change will fix, and so I can't confirm that this will indeed fix the issue. I feel pretty confident that the server.run() function should be modifying the global state object in any case.
Checklist