grafana/pkg/services/accesscontrol/resourcepermissions/models.go
Jo 26339f978b
Auth: Move access control API to SignedInUser interface (#73144)
* move access control api to SignedInUser interface

* remove unused code

* add logic for reading perms from a specific org

* move the specific org logic to org_user.go

* add a comment

---------

Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
2023-08-18 11:42:18 +01:00

34 lines
770 B
Go

package resourcepermissions
import (
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/auth/identity"
)
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 identity.Requester
}