mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-20 20:43:20 +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);
|
password: password}, this.httpOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkAdminCreationStatus() {
|
checkAdminCreationStatus(skip_check = false) {
|
||||||
if (!this.config['Advanced']['multi_user_mode']) {
|
if (!skip_check && !this.config['Advanced']['multi_user_mode']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.adminExists().subscribe(res => {
|
this.adminExists().subscribe(res => {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
if (res['success']) {
|
if (res['success']) {
|
||||||
if (!this.initial_config['Advanced']['multi_user_mode'] && this.new_config['Advanced']['multi_user_mode']) {
|
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
|
// 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
|
// sets new config as old config
|
||||||
this.initial_config = JSON.parse(JSON.stringify(this.new_config));
|
this.initial_config = JSON.parse(JSON.stringify(this.new_config));
|
||||||
|
|||||||
Reference in New Issue
Block a user