diff --git a/server/src/InstanceHandler.cpp b/server/src/InstanceHandler.cpp index 795154d..103b91b 100644 --- a/server/src/InstanceHandler.cpp +++ b/server/src/InstanceHandler.cpp @@ -111,7 +111,7 @@ InstanceHandler::InstanceHandler(SqlDataManager *sql) : sql(sql) { this->groupManager = std::make_shared(nullptr, this->getSql()); this->groupManager->loadGroupFormDatabase(); - if (this->groupManager->availableServerGroups(false).empty()){ + if (this->groupManager->availableServerGroups(false).empty()) { if(!this->setupDefaultGroups()){ logCritical(LOG_INSTANCE, "Could not setup server instance! Stopping..."); mainThreadActive = false; diff --git a/server/src/InstanceHandlerSetup.cpp b/server/src/InstanceHandlerSetup.cpp index 31cdcc4..ce443ab 100644 --- a/server/src/InstanceHandlerSetup.cpp +++ b/server/src/InstanceHandlerSetup.cpp @@ -141,6 +141,7 @@ bool InstanceHandler::setupDefaultGroups() { } } } + this->save_group_permissions(); this->getSql()->pool->threads()->wait_for(); //Wait for all permissions to flush return true; }