Skip to content

Commit 947a50b

Browse files
authored
fix(cli): migration for http plugin ACL (#9049)
* fix cli migration of http allowlist to ACL * Create fix-cli-migration-http-acl.md
1 parent 77b9a50 commit 947a50b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch:bug
3+
---
4+
5+
Fix `tauri migrate` for http plugin ACL.

tooling/cli/src/migrate/config.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tauri_utils::{
1414
};
1515

1616
use std::{
17-
collections::HashSet,
17+
collections::{BTreeMap, HashSet},
1818
fs::{create_dir_all, write},
1919
path::Path,
2020
};
@@ -443,7 +443,11 @@ fn allowlist_to_permissions(
443443
.scope
444444
.0
445445
.into_iter()
446-
.map(|p| AclValue::String(p.to_string()))
446+
.map(|p| {
447+
let mut map = BTreeMap::new();
448+
map.insert("url".to_string(), AclValue::String(p.to_string()));
449+
AclValue::Map(map)
450+
})
447451
.collect::<Vec<_>>();
448452

449453
permissions.push(PermissionEntry::ExtendedPermission {

0 commit comments

Comments
 (0)