mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-27 23:20:56 +03:00
Fixed bug that prevented admin creation prompt from occuring in the settings
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user