mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AccessControl: Cleanup access control interface (#49783)
* removed unused function * Rename interface
This commit is contained in:
@@ -23,9 +23,6 @@ type AccessControl interface {
|
||||
// GetUserPermissions returns user permissions with only action and scope fields set.
|
||||
GetUserPermissions(ctx context.Context, user *models.SignedInUser, options Options) ([]*Permission, error)
|
||||
|
||||
// GetUserRoles returns user roles.
|
||||
GetUserRoles(ctx context.Context, user *models.SignedInUser) ([]*RoleDTO, error)
|
||||
|
||||
//IsDisabled returns if access control is enabled or not
|
||||
IsDisabled() bool
|
||||
|
||||
@@ -38,7 +35,12 @@ type AccessControl interface {
|
||||
RegisterScopeAttributeResolver(scopePrefix string, resolver ScopeAttributeResolver)
|
||||
}
|
||||
|
||||
type PermissionsProvider interface {
|
||||
type RoleRegistry interface {
|
||||
// RegisterFixedRoles registers all roles declared to AccessControl
|
||||
RegisterFixedRoles(ctx context.Context) error
|
||||
}
|
||||
|
||||
type PermissionsStore interface {
|
||||
// GetUserPermissions returns user permissions with only action and scope fields set.
|
||||
GetUserPermissions(ctx context.Context, query GetUserPermissionsQuery) ([]*Permission, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user