mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 00:19:08 +02:00
Disable ownership on mobile
This commit is contained in:
@@ -7,8 +7,19 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/netbirdio/netbird/client/internal/ipcauth"
|
||||
)
|
||||
|
||||
func TestAccessibleByReachesUnownedProfileWhenOwnershipDisabled(t *testing.T) {
|
||||
t.Setenv(ipcauth.EnvDisableProfileOwnership, "true")
|
||||
|
||||
unowned := Profile{}
|
||||
caller := ipcauth.KnownForTest(ipcauth.Identity{UID: 4242})
|
||||
|
||||
assert.True(t, unowned.AccessibleBy(caller), "an unowned profile is reachable with ownership off")
|
||||
}
|
||||
|
||||
func withTempConfigDir(t *testing.T, testFunc func(configDir string)) {
|
||||
t.Helper()
|
||||
tempDir := t.TempDir()
|
||||
|
||||
Reference in New Issue
Block a user