PhlexPlexico/G5V

Super_admin value is reset to 0 after log in

tech62 opened this issue · 1 comments

Hi,

I've set super_admin from database with update user set super_admin = 1 where name = 'mynickname';.
My steamid is set in the production.json from G5API.

But after log in with steam and re-querying the database or API, the user.super_admin is back to 0.

I'm looking to restrict certain functionnality for user (restrict the server add to super_admin) and without retrieve this value, i'm not able to make this possible.

Off topic : Is there a way to hot reload without rebuild at each modification ?

This is intended. If you want to be a super admin you would have to just drop yourself in the list in the config for admins. This is to ensure that users are properly updated and don't require a restart of the API to notice these changes.

If you're playing around and trying to make changes I would highly recommend using development to play around. It uses nodemon and hot reloads any changes. Just make sure you create a dev database and set your node_env to dev.