mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Rename file to store * Move resource permission specific database functions to resourcepermissions package * Wire: Remove interface bind * RBAC: Remove injection of resourcepermission Store * RBAC: Export store constructor * Tests: Use resource permission package to initiate store used in tests * RBAC: Remove internal types package and move to resourcepermissions package * RBAC: Run database tests as itegration tests
33 lines
713 B
Go
33 lines
713 B
Go
package resourcepermissions
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
"github.com/grafana/grafana/pkg/services/user"
|
|
)
|
|
|
|
type SetResourcePermissionCommand struct {
|
|
Actions []string
|
|
Resource string
|
|
ResourceID string
|
|
ResourceAttribute string
|
|
Permission string
|
|
}
|
|
|
|
type SetResourcePermissionsCommand struct {
|
|
User accesscontrol.User
|
|
TeamID int64
|
|
BuiltinRole string
|
|
|
|
SetResourcePermissionCommand
|
|
}
|
|
|
|
type GetResourcePermissionsQuery struct {
|
|
Actions []string
|
|
Resource string
|
|
ResourceID string
|
|
ResourceAttribute string
|
|
OnlyManaged bool
|
|
InheritedScopes []string
|
|
User *user.SignedInUser
|
|
}
|