Chore: Add orguser methods to org service interface (#55668)
* Move role types to a separate package * Make role type singular and remove _ from directory name * Add orguser methods to org service * Fix fake method
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models/roletype"
|
||||
"github.com/grafana/grafana/pkg/services/user"
|
||||
)
|
||||
|
||||
// Typed errors
|
||||
@@ -156,6 +157,33 @@ type RemoveOrgUserCommand struct {
|
||||
UserWasDeleted bool
|
||||
}
|
||||
|
||||
type GetOrgUsersQuery struct {
|
||||
UserID int64
|
||||
OrgID int64
|
||||
Query string
|
||||
Limit int
|
||||
// Flag used to allow oss edition to query users without access control
|
||||
DontEnforceAccessControl bool
|
||||
|
||||
User *user.SignedInUser
|
||||
}
|
||||
|
||||
type SearchOrgUsersQuery struct {
|
||||
OrgID int64
|
||||
Query string
|
||||
Page int
|
||||
Limit int
|
||||
|
||||
User *user.SignedInUser
|
||||
}
|
||||
|
||||
type SearchOrgUsersQueryResult struct {
|
||||
TotalCount int64 `json:"totalCount"`
|
||||
OrgUsers []*OrgUserDTO `json:"OrgUsers"`
|
||||
Page int `json:"page"`
|
||||
PerPage int `json:"perPage"`
|
||||
}
|
||||
|
||||
type ByOrgName []*UserOrgDTO
|
||||
|
||||
// Len returns the length of an array of organisations.
|
||||
|
||||
Reference in New Issue
Block a user