summaryrefslogtreecommitdiff
path: root/python/collaboration/remote.py
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 /python/collaboration/remote.py
parente4db4f0704ea6e6b381e9322a336661dc23c3b5f (diff)
Switch collaboration permission checks to using User objects
Diffstat (limited to 'python/collaboration/remote.py')
-rw-r--r--python/collaboration/remote.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/collaboration/remote.py b/python/collaboration/remote.py
index 811fd33b..1cbdb424 100644
--- a/python/collaboration/remote.py
+++ b/python/collaboration/remote.py
@@ -520,22 +520,22 @@ class Remote:
if not core.BNRemotePullGroups(self._handle, util.wrap_progress(progress), None):
raise RuntimeError(util._last_error())
- def create_group(self, name: str, usernames: List[str]) -> 'group.Group':
+ def create_group(self, name: str, users: List[user.User]) -> 'group.Group':
"""
Create a new group on the remote (and pull it)
.. note:: This function is only available to accounts with admin status on the Remote
:param name: Group name
- :param usernames: List of usernames of users in the group
+ :param users: List of users in the group
:return: Reference to the created group
:raises: RuntimeError if there was an error
"""
- c_usernames = (ctypes.c_char_p * len(usernames))()
- for (i, username) in enumerate(usernames):
- c_usernames[i] = core.cstr(username)
+ c_users = (core.BNCollaborationUserHandle * len(users))()
+ for (i, member) in enumerate(users):
+ c_users[i] = member._handle
- value = core.BNRemoteCreateGroup(self._handle, name, c_usernames, len(usernames))
+ value = core.BNRemoteCreateGroup(self._handle, name, c_users, len(users))
if value is None:
raise RuntimeError(util._last_error())
return group.Group(value)