mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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>
34 lines
770 B
Go
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
|
|
}
|