mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* RBAC: Use query struct in tests * RBAC: If access control enforcement is disabled don't filter out users when fetching permissions
34 lines
761 B
Go
34 lines
761 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
|
|
EnforceAccessControl bool
|
|
User *user.SignedInUser
|
|
}
|