summaryrefslogtreecommitdiff
path: root/rust/src/collaboration/remote.rs
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2026-04-14 16:22:40 -0400
committerJosh Ferrell <josh@vector35.com>2026-05-05 14:46:15 -0400
commitaf50b06082044fcbbf730deda985d0133ca98b88 (patch)
tree6b1ae5a4678d8a39a88af4de2cd150663e1a9c8e /rust/src/collaboration/remote.rs
parente4db4f0704ea6e6b381e9322a336661dc23c3b5f (diff)
Switch collaboration permission checks to using User objects
Diffstat (limited to 'rust/src/collaboration/remote.rs')
-rw-r--r--rust/src/collaboration/remote.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/rust/src/collaboration/remote.rs b/rust/src/collaboration/remote.rs
index 03c808bc..22e65245 100644
--- a/rust/src/collaboration/remote.rs
+++ b/rust/src/collaboration/remote.rs
@@ -515,21 +515,20 @@ impl Remote {
/// # Arguments
///
/// * `name` - Group name
- /// * `usernames` - List of usernames of users in the group
- pub fn create_group<I>(&self, name: &str, usernames: I) -> Result<Ref<RemoteGroup>, ()>
+ /// * `users` - List of users in the group
+ pub fn create_group<I>(&self, name: &str, users: I) -> Result<Ref<RemoteGroup>, ()>
where
- I: IntoIterator<Item = String>,
+ I: IntoIterator<Item = Ref<RemoteUser>>,
{
let name = name.to_cstr();
- let usernames: Vec<_> = usernames.into_iter().map(|s| s.to_cstr()).collect();
- let mut username_ptrs: Vec<_> = usernames.iter().map(|s| s.as_ptr()).collect();
+ let mut user_ptrs: Vec<_> = users.into_iter().map(|s| s.handle.as_ptr()).collect();
let value = unsafe {
BNRemoteCreateGroup(
self.handle.as_ptr(),
name.as_ptr(),
- username_ptrs.as_mut_ptr(),
- username_ptrs.len(),
+ user_ptrs.as_mut_ptr(),
+ user_ptrs.len(),
)
};
NonNull::new(value)