mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 00:06:38 +00:00
[management] auditor allow view all peers
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