mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-26 21:01:32 +08:00
22 lines
376 B
Go
22 lines
376 B
Go
package auth
|
|
|
|
import (
|
|
"github.com/gravitl/netmaker/logic"
|
|
"github.com/gravitl/netmaker/models"
|
|
)
|
|
|
|
// == consts ==
|
|
const (
|
|
node_signin_length = 64
|
|
)
|
|
|
|
func isUserIsAllowed(username, network string) (*models.User, error) {
|
|
|
|
user, err := logic.GetUser(username)
|
|
if err != nil { // user must not exist, so try to make one
|
|
return &models.User{}, err
|
|
}
|
|
|
|
return user, nil
|
|
}
|