|
|
@ -6,7 +6,6 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/slugify" |
|
|
|
"github.com/grafana/grafana/pkg/infra/slugify" |
|
|
|
"github.com/grafana/grafana/pkg/services/auth/identity" |
|
|
|
"github.com/grafana/grafana/pkg/services/auth/identity" |
|
|
|
"github.com/grafana/grafana/pkg/services/user" |
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/setting" |
|
|
|
"github.com/grafana/grafana/pkg/setting" |
|
|
|
"github.com/grafana/grafana/pkg/util/errutil" |
|
|
|
"github.com/grafana/grafana/pkg/util/errutil" |
|
|
|
) |
|
|
|
) |
|
|
@ -82,7 +81,7 @@ type CreateFolderCommand struct { |
|
|
|
Description string `json:"description"` |
|
|
|
Description string `json:"description"` |
|
|
|
ParentUID string `json:"parentUid"` |
|
|
|
ParentUID string `json:"parentUid"` |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// UpdateFolderCommand captures the information required by the folder service
|
|
|
|
// UpdateFolderCommand captures the information required by the folder service
|
|
|
@ -101,7 +100,7 @@ type UpdateFolderCommand struct { |
|
|
|
// Overwrite only used by the legacy folder implementation
|
|
|
|
// Overwrite only used by the legacy folder implementation
|
|
|
|
Overwrite bool `json:"overwrite"` |
|
|
|
Overwrite bool `json:"overwrite"` |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// MoveFolderCommand captures the information required by the folder service
|
|
|
|
// MoveFolderCommand captures the information required by the folder service
|
|
|
@ -111,7 +110,7 @@ type MoveFolderCommand struct { |
|
|
|
NewParentUID string `json:"parentUid"` |
|
|
|
NewParentUID string `json:"parentUid"` |
|
|
|
OrgID int64 `json:"-"` |
|
|
|
OrgID int64 `json:"-"` |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// DeleteFolderCommand captures the information required by the folder service
|
|
|
|
// DeleteFolderCommand captures the information required by the folder service
|
|
|
@ -121,7 +120,7 @@ type DeleteFolderCommand struct { |
|
|
|
OrgID int64 `json:"orgId" xorm:"org_id"` |
|
|
|
OrgID int64 `json:"orgId" xorm:"org_id"` |
|
|
|
ForceDeleteRules bool `json:"forceDeleteRules"` |
|
|
|
ForceDeleteRules bool `json:"forceDeleteRules"` |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetFolderQuery is used for all folder Get requests. Only one of UID, ID, or
|
|
|
|
// GetFolderQuery is used for all folder Get requests. Only one of UID, ID, or
|
|
|
@ -158,15 +157,15 @@ type GetChildrenQuery struct { |
|
|
|
Limit int64 |
|
|
|
Limit int64 |
|
|
|
Page int64 |
|
|
|
Page int64 |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type HasEditPermissionInFoldersQuery struct { |
|
|
|
type HasEditPermissionInFoldersQuery struct { |
|
|
|
SignedInUser *user.SignedInUser |
|
|
|
SignedInUser identity.Requester |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type HasAdminPermissionInDashboardsOrFoldersQuery struct { |
|
|
|
type HasAdminPermissionInDashboardsOrFoldersQuery struct { |
|
|
|
SignedInUser *user.SignedInUser |
|
|
|
SignedInUser identity.Requester |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetDescendantCountsQuery captures the information required by the folder service
|
|
|
|
// GetDescendantCountsQuery captures the information required by the folder service
|
|
|
@ -175,7 +174,7 @@ type GetDescendantCountsQuery struct { |
|
|
|
UID *string |
|
|
|
UID *string |
|
|
|
OrgID int64 |
|
|
|
OrgID int64 |
|
|
|
|
|
|
|
|
|
|
|
SignedInUser *user.SignedInUser `json:"-"` |
|
|
|
SignedInUser identity.Requester `json:"-"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type DescendantCounts map[string]int64 |
|
|
|
type DescendantCounts map[string]int64 |
|
|
|