mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material
This commit is contained in:
@@ -68,7 +68,8 @@ db.defaults(
|
||||
configWriteFlag: false,
|
||||
downloads: {},
|
||||
subscriptions: [],
|
||||
files_to_db_migration_complete: false
|
||||
files_to_db_migration_complete: false,
|
||||
tasks_manager_role_migration_complete: false
|
||||
}).write();
|
||||
|
||||
users_db.defaults(
|
||||
@@ -189,6 +190,15 @@ async function checkMigrations() {
|
||||
else { logger.error('Migration failed: 4.2->4.3+'); }
|
||||
}
|
||||
|
||||
const tasks_manager_role_migration_complete = db.get('tasks_manager_role_migration_complete').value();
|
||||
if (!tasks_manager_role_migration_complete) {
|
||||
logger.info('Checking if tasks manager role permissions exist for admin user...');
|
||||
const success = await auth_api.changeRolePermissions('admin', 'tasks_manager', 'yes');
|
||||
if (success) logger.info('Task manager permissions check complete!');
|
||||
else logger.error('Failed to auto add tasks manager permissions to admin role!');
|
||||
db.set('tasks_manager_role_migration_complete', true).write();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user