summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
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 /binaryninjaapi.h
parente4db4f0704ea6e6b381e9322a336661dc23c3b5f (diff)
Switch collaboration permission checks to using User objects
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h17
1 files changed, 9 insertions, 8 deletions
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<Symbol> 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<std::string>& usernames);
- bool ContainsUser(const std::string& username);
-
+ std::vector<Ref<CollabUser>> GetUsers();
+ void SetUsers(const std::vector<Ref<CollabUser>>& users);
+ bool ContainsUser(Ref<CollabUser> 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<CollabGroup> CreateGroup(const std::string& name, const std::vector<std::string>& usernames);
+ Ref<CollabGroup> CreateGroup(const std::string& name, const std::vector<Ref<CollabUser>>& users = {});
/*!
@@ -23145,9 +23146,9 @@ namespace BinaryNinja::Collaboration
Ref<CollabPermission> CreateUserPermission(const std::string& userId, BNCollaborationPermissionLevel level, ProgressFunction progress = {});
void PushPermission(Ref<CollabPermission> permission, const std::vector<std::pair<std::string, std::string>>& extraFields = {});
void DeletePermission(Ref<CollabPermission> permission);
- bool CanUserView(const std::string& username);
- bool CanUserEdit(const std::string& username);
- bool CanUserAdmin(const std::string& username);
+ bool CanUserView(Ref<CollabUser> user);
+ bool CanUserEdit(Ref<CollabUser> user);
+ bool CanUserAdmin(Ref<CollabUser> user);
};
class AnalysisMergeConflict : public CoreRefCountObject<BNAnalysisMergeConflict, BNNewAnalysisMergeConflictReference, BNFreeAnalysisMergeConflict>