CLI: Updates for Exchange Help (#2191)
## Description Removes references to M365 ID as instruction. <!-- Insert PR description--> ## Does this PR need a docs update or release note? - [x] ⛔ No, self-documenting ## Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🐛 Bugfix ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * closes #2190 ## Test Plan - [x] ⚡ Unit test
This commit is contained in:
parent
7872201f73
commit
cd77f43fb2
@ -61,7 +61,7 @@ const (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
exchangeServiceCommand = "exchange"
|
exchangeServiceCommand = "exchange"
|
||||||
exchangeServiceCommandCreateUseSuffix = "--user <userId or email> | '" + utils.Wildcard + "'"
|
exchangeServiceCommandCreateUseSuffix = "--user <email> | '" + utils.Wildcard + "'"
|
||||||
exchangeServiceCommandDeleteUseSuffix = "--backup <backupId>"
|
exchangeServiceCommandDeleteUseSuffix = "--backup <backupId>"
|
||||||
exchangeServiceCommandDetailsUseSuffix = "--backup <backupId>"
|
exchangeServiceCommandDetailsUseSuffix = "--backup <backupId>"
|
||||||
)
|
)
|
||||||
@ -115,7 +115,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
fs.StringSliceVar(
|
fs.StringSliceVar(
|
||||||
&user,
|
&user,
|
||||||
utils.UserFN, nil,
|
utils.UserFN, nil,
|
||||||
"Backup Exchange data by user ID; accepts '"+utils.Wildcard+"' to select all users")
|
"Backup Exchange data by a user's email; accepts '"+utils.Wildcard+"' to select all users")
|
||||||
fs.StringSliceVar(
|
fs.StringSliceVar(
|
||||||
&exchangeData,
|
&exchangeData,
|
||||||
utils.DataFN, nil,
|
utils.DataFN, nil,
|
||||||
@ -274,7 +274,7 @@ func createExchangeCmd(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
users, err := m365.UserPNs(ctx, acct)
|
users, err := m365.UserPNs(ctx, acct)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Only(ctx, errors.Wrap(err, "Failed to retrieve M365 users"))
|
return Only(ctx, errors.Wrap(err, "Failed to retrieve M365 user(s)"))
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -347,7 +347,7 @@ func exchangeBackupCreateSelectors(userIDs, data []string) *selectors.ExchangeBa
|
|||||||
|
|
||||||
func validateExchangeBackupCreateFlags(userIDs, data []string) error {
|
func validateExchangeBackupCreateFlags(userIDs, data []string) error {
|
||||||
if len(userIDs) == 0 {
|
if len(userIDs) == 0 {
|
||||||
return errors.New("--user requires one or more ids or the wildcard *")
|
return errors.New("--user requires one or more email addresses or the wildcard '*'")
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, d := range data {
|
for _, d := range data {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
oneDriveServiceCommand = "onedrive"
|
oneDriveServiceCommand = "onedrive"
|
||||||
oneDriveServiceCommandCreateUseSuffix = "--user <userId or email> | '" + utils.Wildcard + "'"
|
oneDriveServiceCommandCreateUseSuffix = "--user <email> | '" + utils.Wildcard + "'"
|
||||||
oneDriveServiceCommandDeleteUseSuffix = "--backup <backupId>"
|
oneDriveServiceCommandDeleteUseSuffix = "--backup <backupId>"
|
||||||
oneDriveServiceCommandDetailsUseSuffix = "--backup <backupId>"
|
oneDriveServiceCommandDetailsUseSuffix = "--backup <backupId>"
|
||||||
)
|
)
|
||||||
@ -85,7 +85,7 @@ func addOneDriveCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
|
|
||||||
fs.StringSliceVar(&user,
|
fs.StringSliceVar(&user,
|
||||||
utils.UserFN, nil,
|
utils.UserFN, nil,
|
||||||
"Backup OneDrive data by user ID; accepts '"+utils.Wildcard+"' to select all users. (required)")
|
"Backup OneDrive data by user's email address; accepts '"+utils.Wildcard+"' to select all users. (required)")
|
||||||
options.AddOperationFlags(c)
|
options.AddOperationFlags(c)
|
||||||
|
|
||||||
case listCommand:
|
case listCommand:
|
||||||
|
|||||||
@ -63,7 +63,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
|
|
||||||
fs.StringSliceVar(&user,
|
fs.StringSliceVar(&user,
|
||||||
utils.UserFN, nil,
|
utils.UserFN, nil,
|
||||||
"Restore data by user ID; accepts '"+utils.Wildcard+"' to select all users.")
|
"Restore data by user's email address; accepts '"+utils.Wildcard+"' to select all users.")
|
||||||
|
|
||||||
// email flags
|
// email flags
|
||||||
fs.StringSliceVar(&email,
|
fs.StringSliceVar(&email,
|
||||||
|
|||||||
@ -49,7 +49,7 @@ func addOneDriveCommands(cmd *cobra.Command) *cobra.Command {
|
|||||||
|
|
||||||
fs.StringSliceVar(&user,
|
fs.StringSliceVar(&user,
|
||||||
utils.UserFN, nil,
|
utils.UserFN, nil,
|
||||||
"Restore data by user ID; accepts '"+utils.Wildcard+"' to select all users.")
|
"Restore data by user's email address; accepts '"+utils.Wildcard+"' to select all users.")
|
||||||
|
|
||||||
// onedrive hierarchy (path/name) flags
|
// onedrive hierarchy (path/name) flags
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user