Merge branch 'fix/auditor-view-all-peers' into feature/user-info-with-role-permissions

This commit is contained in:
Pedro Costa
2025-04-29 09:37:33 +01:00
+2 -2
View File
@@ -53,8 +53,8 @@ func (am *DefaultAccountManager) GetPeers(ctx context.Context, accountID, userID
peersMap := make(map[string]*nbpeer.Peer) peersMap := make(map[string]*nbpeer.Peer)
for _, peer := range accountPeers { for _, peer := range accountPeers {
if user.IsRegularUser() && user.Id != peer.UserID { if user.Role != types.UserRoleAuditor && user.IsRegularUser() && user.Id != peer.UserID {
// only display peers that belong to the current user if the current user is not an admin // only display peers that belong to the current user if the current user is not an admin or an auditor
continue continue
} }
peers = append(peers, peer) peers = append(peers, peer)