From af50b06082044fcbbf730deda985d0133ca98b88 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Tue, 14 Apr 2026 16:22:40 -0400 Subject: Switch collaboration permission checks to using User objects --- binaryninjaapi.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index ac528db8..1dd3bc0f 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -5780,7 +5780,7 @@ namespace BinaryNinja { void PerformDefineRelocation(Architecture* arch, BNRelocationInfo& info, Ref sym, uint64_t reloc); /*! OnAfterSnapshotDataApplied is called when loading a view from a database, after snapshot data has been applied to it. - + \note This method **may** be overridden by custom BinaryViews. \warning This method **must not** be called directly. @@ -22511,9 +22511,9 @@ namespace BinaryNinja::Collaboration uint64_t GetId(); std::string GetName(); void SetName(const std::string& name); - void SetUsernames(const std::vector& usernames); - bool ContainsUser(const std::string& username); - + std::vector> GetUsers(); + void SetUsers(const std::vector>& users); + bool ContainsUser(Ref user); }; /*! @@ -22694,10 +22694,11 @@ namespace BinaryNinja::Collaboration /*! Create a new group on the remote (and pull it) \param name Group name + \param users List of users in group \return Reference to the created group \throws RemoteException If there is an error in any request or if the remote is not connected */ - Ref CreateGroup(const std::string& name, const std::vector& usernames); + Ref CreateGroup(const std::string& name, const std::vector>& users = {}); /*! @@ -23145,9 +23146,9 @@ namespace BinaryNinja::Collaboration Ref CreateUserPermission(const std::string& userId, BNCollaborationPermissionLevel level, ProgressFunction progress = {}); void PushPermission(Ref permission, const std::vector>& extraFields = {}); void DeletePermission(Ref permission); - bool CanUserView(const std::string& username); - bool CanUserEdit(const std::string& username); - bool CanUserAdmin(const std::string& username); + bool CanUserView(Ref user); + bool CanUserEdit(Ref user); + bool CanUserAdmin(Ref user); }; class AnalysisMergeConflict : public CoreRefCountObject -- cgit v1.3.1