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:
idafurjes
2022-09-23 07:19:34 -04:00
committed by GitHub
parent 7f98f4b411
commit fb66439c3e
4 changed files with 119 additions and 8 deletions
+28
View File
@@ -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.