Skip to content

Commit

Permalink
fix(cli): migration for http plugin ACL (#9049)
Browse files Browse the repository at this point in the history
* fix cli migration of http allowlist to ACL

* Create fix-cli-migration-http-acl.md
  • Loading branch information
i-c-b authored Mar 3, 2024
1 parent 77b9a50 commit 947a50b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-cli-migration-http-acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Fix `tauri migrate` for http plugin ACL.
8 changes: 6 additions & 2 deletions tooling/cli/src/migrate/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use tauri_utils::{
};

use std::{
collections::HashSet,
collections::{BTreeMap, HashSet},
fs::{create_dir_all, write},
path::Path,
};
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 947a50b

Please sign in to comment.