Fixed bug that prevented admin creation prompt from occuring in the settings

pull/82/head
Tzahi12345 6 years ago
parent da26d88ba9
commit 7661b1e79e

@ -436,8 +436,8 @@ export class PostsService implements CanActivate {
password: password}, this.httpOptions);
}
checkAdminCreationStatus() {
if (!this.config['Advanced']['multi_user_mode']) {
checkAdminCreationStatus(skip_check = false) {
if (!skip_check && !this.config['Advanced']['multi_user_mode']) {
return;
}
this.adminExists().subscribe(res => {

@ -65,7 +65,7 @@ export class SettingsComponent implements OnInit {
if (res['success']) {
if (!this.initial_config['Advanced']['multi_user_mode'] && this.new_config['Advanced']['multi_user_mode']) {
// multi user mode was enabled, let's check if default admin account exists
this.postsService.checkAdminCreationStatus();
this.postsService.checkAdminCreationStatus(true);
}
// sets new config as old config
this.initial_config = JSON.parse(JSON.stringify(this.new_config));

Loading…
Cancel
Save