Documentation ¶
Index ¶
- Constants
- Variables
- func AddActionNameMigrator(mg *migrator.Migrator)
- func AddAdminOnlyMigration(mg *migrator.Migrator)
- func AddAlertingPermissionsMigrator(mg *migrator.Migrator)
- func AddDashboardPermissionsMigrator(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsRepeatFixedMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsRepeatMigration(mg *migrator.Migrator)
- func AddManagedPermissionsMigration(mg *migrator.Migrator, migrationID string)
- func AddMigration(mg *migrator.Migrator)
- func AddSeedAssignmentMigrations(mg *migrator.Migrator)
- func AddTeamMembershipMigrations(mg *migrator.Migrator)
- func GenerateManagedRoleUID(orgID int64, name string) (string, error)
- func ParseRoleFromName(roleName string) string
- type ErrUnknownRole
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 AddAdminOnlyMigration ¶
func AddManagedFolderAlertActionsRepeatFixedMigration ¶
AddManagedFolderAlertActionsRepeatFixedMigration is a fixed version of AddManagedFolderAlertActionsRepeatMigration.
func AddManagedFolderAlertActionsRepeatMigration ¶
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 AddMigration ¶
func GenerateManagedRoleUID ¶
GenerateManagedRoleUID generated a deterministic uid of the form `managed_{org_id}_{type}_{id}`.
func ParseRoleFromName ¶
Converts from managed:builtins:<role>:permissions to <Role> Example: managed:builtins:editor:permissions -> Editor
Types ¶
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
Click to show internal directories.
Click to hide internal directories.