accesscontrol

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ActionMigrationID = "RBAC action name migrator"
View Source
const CodeMigrationSQL = "code migration"
View Source
const ManagedPermissionsMigrationID = "managed permissions migration"
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 AddDashboardPermissionsMigrator

func AddDashboardPermissionsMigrator(mg *migrator.Migrator)

func AddDisabledMigrator

func AddDisabledMigrator(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 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

Jump to

Keyboard shortcuts

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