mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-27 06:49:07 +01: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)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user