fix(cli): migration for http plugin ACL (#9049)

* fix cli migration of http allowlist to ACL

* Create fix-cli-migration-http-acl.md
This commit is contained in:
i-c-b 2024-03-03 22:28:31 +10:00 committed by GitHub
parent 77b9a508a4
commit 947a50b8e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fix `tauri migrate` for http plugin ACL.

View File

@ -14,7 +14,7 @@ use tauri_utils::{
};
use std::{
collections::HashSet,
collections::{BTreeMap, HashSet},
fs::{create_dir_all, write},
path::Path,
};
@ -443,7 +443,11 @@ fn allowlist_to_permissions(
.scope
.0
.into_iter()
.map(|p| AclValue::String(p.to_string()))
.map(|p| {
let mut map = BTreeMap::new();
map.insert("url".to_string(), AclValue::String(p.to_string()));
AclValue::Map(map)
})
.collect::<Vec<_>>();
permissions.push(PermissionEntry::ExtendedPermission {