mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-17 12:09:58 +00:00
Merge branch 'fix/auditor-view-all-peers' into feature/user-info-with-role-permissions
This commit is contained in:
@@ -53,8 +53,8 @@ func (am *DefaultAccountManager) GetPeers(ctx context.Context, accountID, userID
|
||||
peersMap := make(map[string]*nbpeer.Peer)
|
||||
|
||||
for _, peer := range accountPeers {
|
||||
if user.IsRegularUser() && user.Id != peer.UserID {
|
||||
// only display peers that belong to the current user if the current user is not an admin
|
||||
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 or an auditor
|
||||
continue
|
||||
}
|
||||
peers = append(peers, peer)
|
||||
|
||||
Reference in New Issue
Block a user