accesscontrol

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ActionMigrationID = "RBAC action name migrator"
View Source
const (
	AlertingScopeRemovalMigrationID = "removing scope from alert.instances:read action migration"
)
View Source
const CodeMigrationSQL = "code migration"
View Source
const ManagedDashboardAnnotationActionsMigratorID = "managed dashboard permissions annotation actions migration"
View Source
const ManagedFolderAlertingSilencesActionsMigratorID = "managed folder permissions alerting silences actions migration"
View Source
const ManagedPermissionsMigrationID = "managed permissions migration"
View Source
const PreventSeedingOnCallAccessID = "prevent seeding OnCall access"
View Source
const (
	TeamsMigrationID = "teams permissions migration"
)

Variables

View Source
var ErrAddTeamMembershipMigrations = fmt.Errorf("Error migrating team memberships")

Functions

func AddActionNameMigrator

func AddActionNameMigrator(mg *migrator.Migrator)

func AddAdminOnlyMigration

func AddAdminOnlyMigration(mg *migrator.Migrator)

func AddAlertingPermissionsMigrator

func AddAlertingPermissionsMigrator(mg *migrator.Migrator)

func AddAlertingScopeRemovalMigration

func AddAlertingScopeRemovalMigration(mg *migrator.Migrator)

func AddDashboardPermissionsMigrator

func AddDashboardPermissionsMigrator(mg *migrator.Migrator)

func AddDisabledMigrator

func AddDisabledMigrator(mg *migrator.Migrator)

func AddManagedDashboardAnnotationActionsMigration

func AddManagedDashboardAnnotationActionsMigration(mg *migrator.Migrator)

func AddManagedFolderAlertActionsMigration

func AddManagedFolderAlertActionsMigration(mg *migrator.Migrator)

func AddManagedFolderAlertActionsRepeatFixedMigration

func AddManagedFolderAlertActionsRepeatFixedMigration(mg *migrator.Migrator)

AddManagedFolderAlertActionsRepeatFixedMigration is a fixed version of AddManagedFolderAlertActionsRepeatMigration.

func AddManagedFolderAlertActionsRepeatMigration

func AddManagedFolderAlertActionsRepeatMigration(mg *migrator.Migrator)

AddManagedFolderAlertActionsMigration has to be run after AddDashboardPermissionsMigrator, as it is only effective if dashboard permissions have already been migrated. AddManagedFolderAlertActionsRepeatMigrator ensures that alerting permissions that have already been added won't get added twice.

func AddManagedFolderAlertingSilencesActionsMigrator

func AddManagedFolderAlertingSilencesActionsMigrator(mg *migrator.Migrator)

func AddManagedFolderLibraryPanelActionsMigration

func AddManagedFolderLibraryPanelActionsMigration(mg *migrator.Migrator)

func AddManagedPermissionsMigration

func AddManagedPermissionsMigration(mg *migrator.Migrator, migrationID string)

func AddMigration

func AddMigration(mg *migrator.Migrator)

func AddSeedAssignmentMigrations

func AddSeedAssignmentMigrations(mg *migrator.Migrator)

func AddTeamMembershipMigrations

func AddTeamMembershipMigrations(mg *migrator.Migrator)

func GenerateManagedRoleUID

func GenerateManagedRoleUID(orgID int64, name string) (string, error)

GenerateManagedRoleUID generated a deterministic uid of the form `managed_{org_id}_{type}_{id}`.

func ParseRoleFromName

func ParseRoleFromName(roleName string) string

Converts from managed:builtins:<role>:permissions to <Role> Example: managed:builtins:editor:permissions -> Editor

Types

type DisabledMigrator

type DisabledMigrator struct {
	migrator.MigrationBase
}

func (*DisabledMigrator) Exec

func (m *DisabledMigrator) Exec(sess *xorm.Session, mg *migrator.Migrator) error

func (*DisabledMigrator) SQL

func (m *DisabledMigrator) SQL(dialect migrator.Dialect) string

type ErrUnknownRole

type ErrUnknownRole struct {
	// contains filtered or unexported fields
}

func (*ErrUnknownRole) Error

func (e *ErrUnknownRole) Error() string

func (*ErrUnknownRole) Unwrap

func (e *ErrUnknownRole) Unwrap() error

type SeedAssignmentOnCallAccessMigrator

type SeedAssignmentOnCallAccessMigrator struct {
	migrator.MigrationBase
}

func (*SeedAssignmentOnCallAccessMigrator) Exec

func (*SeedAssignmentOnCallAccessMigrator) SQL

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL