Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Sep 15, 2024
1 parent 890c0d4 commit ed7180f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/ptero_perms_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ async fn run_on_server(data: &ProtobotData, server: &str) -> Result<(), crate::E
} else if remaining_panel_access.remove(&existing_user.email) {
if existing_user.permissions.iter().collect::<HashSet<_>>() != panel_access_perms {
server
.set_user_permissions(existing_user.uuid, panel_access_perms.iter().collect())
.set_user_permissions(
existing_user.uuid,
panel_access_perms
.iter()
.map(|str| (*str).clone())
.collect(),
)
.await?;
}
} else if !ignored_emails.contains(&existing_user.email) {
Expand All @@ -80,7 +86,13 @@ async fn run_on_server(data: &ProtobotData, server: &str) -> Result<(), crate::E
}
for user in remaining_panel_access {
server
.add_user(user, panel_access_perms.iter().collect())
.add_user(
user,
panel_access_perms
.iter()
.map(|str| (*str).clone())
.collect(),
)
.await?;
}

Expand Down

0 comments on commit ed7180f

Please sign in to comment.