lxd/db/operations.go
func (t OperationType) Permission() string {
	switch t {
	case OperationBackupCreate:
		return "operate-containers"
	case OperationBackupRename:
		return "operate-containers"
	case OperationBackupRestore:
		return "operate-containers"
	case OperationBackupRemove:
		return "operate-containers"
	case OperationConsoleShow:
		return "operate-containers"
	case OperationContainerFreeze:
		return "operate-containers"
	case OperationContainerUnfreeze:
		return "operate-containers"
	case OperationContainerStart:
		return "operate-containers"
	case OperationContainerStop:
		return "operate-containers"
	case OperationContainerRestart:
		return "operate-containers"
	case OperationCommandExec:
		return "operate-containers"
	case OperationSnapshotCreate:
		return "operate-containers"
	case OperationSnapshotRename:
		return "operate-containers"
	case OperationSnapshotTransfer:
		return "operate-containers"
	case OperationSnapshotUpdate:
		return "operate-containers"
	case OperationSnapshotDelete:
		return "operate-containers"

	case OperationContainerCreate:
		return "manage-containers"
	case OperationContainerUpdate:
		return "manage-containers"
	case OperationContainerRename:
		return "manage-containers"
	case OperationContainerMigrate:
		return "manage-containers"
	case OperationContainerLiveMigrate:
		return "manage-containers"
	case OperationContainerDelete:
		return "manage-containers"
	case OperationSnapshotRestore:
		return "manage-containers"

	case OperationImageDownload:
		return "manage-images"
	case OperationImageDelete:
		return "manage-images"
	case OperationImageToken:
		return "manage-images"
	case OperationImageRefresh:
		return "manage-images"
	case OperationImagesUpdate:
		return "manage-images"
	case OperationImagesSynchronize:
		return "manage-images"
	}

	return ""
}
func (t OperationType) Permission() string {
	switch t {
	case OperationBackupCreate:
		return "operate-containers"
	case OperationBackupRename:
		return "operate-containers"
	case OperationBackupRestore:
		return "operate-containers"
	case OperationBackupRemove:
		return "operate-containers"
	case OperationConsoleShow:
		return "operate-containers"
	case OperationContainerFreeze:
		return "operate-containers"
	case OperationContainerUnfreeze:
		return "operate-containers"
	case OperationContainerStart:
		return "operate-containers"
	case OperationContainerStop:
		return "operate-containers"
	case OperationContainerRestart:
		return "operate-containers"
	case OperationCommandExec:
		return "operate-containers"
	case OperationSnapshotCreate:
		return "operate-containers"
	case OperationSnapshotRename:
		return "operate-containers"
	case OperationSnapshotTransfer:
		return "operate-containers"
	case OperationSnapshotUpdate:
		return "operate-containers"
	case OperationSnapshotDelete:
		return "operate-containers"

	case OperationContainerCreate:
		return "manage-containers"
	case OperationContainerUpdate:
		return "manage-containers"
	case OperationContainerRename:
		return "manage-containers"
	case OperationContainerMigrate:
		return "manage-containers"
	case OperationContainerLiveMigrate:
		return "manage-containers"
	case OperationContainerDelete:
		return "manage-containers"
	case OperationSnapshotRestore:
		return "manage-containers"

	case OperationImageDownload:
		return "manage-images"
	case OperationImageDelete:
		return "manage-images"
	case OperationImageToken:
		return "manage-images"
	case OperationImageRefresh:
		return "manage-images"
	case OperationImagesUpdate:
		return "manage-images"
	case OperationImagesSynchronize:
		return "manage-images"
	}

	return ""
}
func ( t OperationType ) Permission ( ) string { switch t { case OperationBackupCreate : return " " case OperationBackupRename : return " " case OperationBackupRestore : return " " case OperationBackupRemove : return " " case OperationConsoleShow : return " " case OperationContainerFreeze : return " " case OperationContainerUnfreeze : return " " case OperationContainerStart : return " " case OperationContainerStop : return " " case OperationContainerRestart : return " " case OperationCommandExec : return " " case OperationSnapshotCreate : return " " case OperationSnapshotRename : return " " case OperationSnapshotTransfer : return " " case OperationSnapshotUpdate : return " " case OperationSnapshotDelete : return " " case OperationContainerCreate : return " " case OperationContainerUpdate : return " " case OperationContainerRename : return " " case OperationContainerMigrate : return " " case OperationContainerLiveMigrate : return " " case OperationContainerDelete : return " " case OperationSnapshotRestore : return " " case OperationImageDownload : return " " case OperationImageDelete : return " " case OperationImageToken : return " " case OperationImageRefresh : return " " case OperationImagesUpdate : return " " case OperationImagesSynchronize : return " " } return " " }
// Permission returns the needed RBAC permission to cancel the oepration
Permission returns the needed RBAC permission to cancel the oepration