2022-08-18 02:43:45 -05:00
|
|
|
package resourcepermissions
|
2022-02-07 10:04:32 -06:00
|
|
|
|
2022-03-01 03:58:41 -06:00
|
|
|
import (
|
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
2022-08-10 04:56:48 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/user"
|
2022-03-01 03:58:41 -06:00
|
|
|
)
|
2022-02-07 10:04:32 -06:00
|
|
|
|
|
|
|
type SetResourcePermissionCommand struct {
|
2022-03-21 11:58:18 -05:00
|
|
|
Actions []string
|
|
|
|
Resource string
|
|
|
|
ResourceID string
|
|
|
|
ResourceAttribute string
|
|
|
|
Permission string
|
2022-02-07 10:04:32 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type SetResourcePermissionsCommand struct {
|
|
|
|
User accesscontrol.User
|
|
|
|
TeamID int64
|
|
|
|
BuiltinRole string
|
|
|
|
|
|
|
|
SetResourcePermissionCommand
|
|
|
|
}
|
|
|
|
|
2022-03-17 11:08:51 -05:00
|
|
|
type GetResourcePermissionsQuery struct {
|
2022-10-19 04:53:59 -05:00
|
|
|
Actions []string
|
|
|
|
Resource string
|
|
|
|
ResourceID string
|
|
|
|
ResourceAttribute string
|
|
|
|
OnlyManaged bool
|
|
|
|
InheritedScopes []string
|
|
|
|
EnforceAccessControl bool
|
|
|
|
User *user.SignedInUser
|
2022-02-07 10:04:32 -06:00
|
|
|
}
|