mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 16:39:09 +02:00
Remove unused types declarations
This commit is contained in:
@@ -8,15 +8,6 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockAzureCredentials struct {
|
|
||||||
jwtToken JWTToken
|
|
||||||
err error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mc *mockAzureCredentials) Authenticate() (JWTToken, error) {
|
|
||||||
return mc.jwtToken, mc.err
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAzureJwtStillValid(t *testing.T) {
|
func TestAzureJwtStillValid(t *testing.T) {
|
||||||
type jwtStillValidTest struct {
|
type jwtStillValidTest struct {
|
||||||
name string
|
name string
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ func (zm *ZitadelManager) GetUserDataByID(userID string, appMetadata AppMetadata
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetAccount returns all the users for a given profile.
|
// GetAccount returns all the users for a given profile.
|
||||||
func (zm *ZitadelManager) GetAccount(_ string) ([]*UserData, error) {
|
func (zm *ZitadelManager) GetAccount(accountID string) ([]*UserData, error) {
|
||||||
body, err := zm.post("users/_search", "")
|
body, err := zm.post("users/_search", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -312,7 +312,10 @@ func (zm *ZitadelManager) GetAccount(_ string) ([]*UserData, error) {
|
|||||||
|
|
||||||
users := make([]*UserData, 0)
|
users := make([]*UserData, 0)
|
||||||
for _, profile := range profiles.Result {
|
for _, profile := range profiles.Result {
|
||||||
users = append(users, profile.userData())
|
userData := profile.userData()
|
||||||
|
userData.AppMetadata.WTAccountID = accountID
|
||||||
|
|
||||||
|
users = append(users, userData)
|
||||||
}
|
}
|
||||||
|
|
||||||
return users, nil
|
return users, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user