Chore: Port user services to identity.Requester (#73851)
* port api key api to signedinuser * port users to signed in user interface * fix tests
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/auth/identity"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/quota"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -50,7 +50,7 @@ type DeleteCommand struct {
|
||||
type GetApiKeysQuery struct {
|
||||
OrgID int64
|
||||
IncludeExpired bool
|
||||
User *user.SignedInUser
|
||||
User identity.Requester
|
||||
}
|
||||
type GetByNameQuery struct {
|
||||
KeyName string
|
||||
|
||||
@@ -33,7 +33,7 @@ type Requester interface {
|
||||
GetLogin() string
|
||||
// GetNamespacedID returns the namespace and ID of the active entity.
|
||||
// The namespace is one of the constants defined in pkg/services/auth/identity.
|
||||
GetNamespacedID() (string, string)
|
||||
GetNamespacedID() (namespace string, identifier string)
|
||||
// GetOrgID returns the ID of the active organization
|
||||
GetOrgID() int64
|
||||
// GetOrgRole returns the role of the active entity in the active organization.
|
||||
|
||||
Reference in New Issue
Block a user