be5ced4287
* Remove different constructors and only use NewNamespaceID * AdminUser: check typed namespace id * Identity: Add convinient function to parse valid user id when type is either user or service account * Annotations: Use typed namespace id instead
26 lines
755 B
Go
26 lines
755 B
Go
package authn
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/services/auth/identity"
|
|
)
|
|
|
|
const (
|
|
NamespaceUser = identity.NamespaceUser
|
|
NamespaceAPIKey = identity.NamespaceAPIKey
|
|
NamespaceServiceAccount = identity.NamespaceServiceAccount
|
|
NamespaceAnonymous = identity.NamespaceAnonymous
|
|
NamespaceRenderService = identity.NamespaceRenderService
|
|
NamespaceAccessPolicy = identity.NamespaceAccessPolicy
|
|
)
|
|
|
|
var AnonymousNamespaceID = NewNamespaceID(NamespaceAnonymous, 0)
|
|
|
|
type NamespaceID = identity.NamespaceID
|
|
|
|
var (
|
|
ParseNamespaceID = identity.ParseNamespaceID
|
|
MustParseNamespaceID = identity.MustParseNamespaceID
|
|
NewNamespaceID = identity.NewNamespaceID
|
|
ErrInvalidNamespaceID = identity.ErrInvalidNamespaceID
|
|
)
|