force userPN on exchange, onedrive backup (#3052)
#### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🐛 Bugfix #### Issue(s) * #2825 #### Test Plan - [x] 💪 Manual
This commit is contained in:
parent
0fd1314479
commit
b953eb1bd5
@ -303,8 +303,8 @@ func (suite *PreparedBackupExchangeE2ESuite) SetupSuite() {
|
||||
|
||||
var (
|
||||
users = []string{suite.m365UserID}
|
||||
idToName = map[string]string{suite.m365UserID: "todo-name-" + suite.m365UserID}
|
||||
nameToID = map[string]string{"todo-name-" + suite.m365UserID: suite.m365UserID}
|
||||
idToName = map[string]string{suite.m365UserID: suite.m365UserID}
|
||||
nameToID = map[string]string{suite.m365UserID: suite.m365UserID}
|
||||
ins = common.IDsNames{
|
||||
IDToName: idToName,
|
||||
NameToID: nameToID,
|
||||
|
||||
@ -209,8 +209,8 @@ func (suite *BackupDeleteOneDriveE2ESuite) SetupSuite() {
|
||||
var (
|
||||
m365UserID = tester.M365UserID(t)
|
||||
users = []string{m365UserID}
|
||||
idToName = map[string]string{m365UserID: "todo-name-" + m365UserID}
|
||||
nameToID = map[string]string{"todo-name-" + m365UserID: m365UserID}
|
||||
idToName = map[string]string{m365UserID: m365UserID}
|
||||
nameToID = map[string]string{m365UserID: m365UserID}
|
||||
ins = common.IDsNames{
|
||||
IDToName: idToName,
|
||||
NameToID: nameToID,
|
||||
|
||||
@ -161,8 +161,8 @@ func (suite *BackupDeleteSharePointE2ESuite) SetupSuite() {
|
||||
var (
|
||||
m365SiteID = tester.M365SiteID(t)
|
||||
sites = []string{m365SiteID}
|
||||
idToName = map[string]string{m365SiteID: "todo-name-" + m365SiteID}
|
||||
nameToID = map[string]string{"todo-name-" + m365SiteID: m365SiteID}
|
||||
idToName = map[string]string{m365SiteID: m365SiteID}
|
||||
nameToID = map[string]string{m365SiteID: m365SiteID}
|
||||
ins = common.IDsNames{
|
||||
IDToName: idToName,
|
||||
NameToID: nameToID,
|
||||
|
||||
@ -77,8 +77,8 @@ func (suite *RestoreExchangeE2ESuite) SetupSuite() {
|
||||
|
||||
var (
|
||||
users = []string{suite.m365UserID}
|
||||
idToName = map[string]string{suite.m365UserID: "todo-name-" + suite.m365UserID}
|
||||
nameToID = map[string]string{"todo-name-" + suite.m365UserID: suite.m365UserID}
|
||||
idToName = map[string]string{suite.m365UserID: suite.m365UserID}
|
||||
nameToID = map[string]string{suite.m365UserID: suite.m365UserID}
|
||||
ins = common.IDsNames{
|
||||
IDToName: idToName,
|
||||
NameToID: nameToID,
|
||||
|
||||
@ -27,6 +27,7 @@ import (
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/logger"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/corso/src/pkg/store"
|
||||
@ -318,6 +319,11 @@ func (r repository) NewBackupWithLookup(
|
||||
return operations.BackupOperation{}, errors.Wrap(err, "resolving resource owner details")
|
||||
}
|
||||
|
||||
// Exchange and OneDrive need to maintain the user PN as the ID until we're ready to migrate
|
||||
if sel.PathService() != path.SharePointService {
|
||||
ownerID = ownerName
|
||||
}
|
||||
|
||||
// TODO: retrieve display name from gc
|
||||
sel = sel.SetDiscreteOwnerIDName(ownerID, ownerName)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user