Skip to content

Commit

Permalink
removed dex auth and change messages
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-crespo-fdc committed Aug 22, 2024
1 parent 1f40afb commit 177eb15
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cli/pkg/locks/app_lock_parsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ func ParseArgsCreateAppLock(args []string) (LockParameters, error) {
}

type DeleteAppLockCommandLineArguments struct {
environment cli_utils.RepeatedString
lockId cli_utils.RepeatedString
application cli_utils.RepeatedString
useDexAuthentication bool
environment cli_utils.RepeatedString
lockId cli_utils.RepeatedString
application cli_utils.RepeatedString
}

func argsValidDeleteAppLock(cmdArgs *DeleteAppLockCommandLineArguments) (result bool, errorMessage string) {
Expand All @@ -129,10 +128,9 @@ func readDeleteAppLockArgs(args []string) (*DeleteAppLockCommandLineArguments, e

fs := flag.NewFlagSet("flag set", flag.ContinueOnError)

fs.Var(&cmdArgs.lockId, "lockID", "the ID of the lock you are trying to create")
fs.Var(&cmdArgs.environment, "environment", "the environment to lock")
fs.Var(&cmdArgs.application, "application", "application to lock")
fs.BoolVar(&cmdArgs.useDexAuthentication, "use_dex_auth", false, "if set to true, the /api/* endpoint will be used. Dex must be enabled on the server side and a dex token must be provided, otherwise the request will be denied")
fs.Var(&cmdArgs.lockId, "lockID", "the ID of the lock you are trying to delete")
fs.Var(&cmdArgs.environment, "environment", "the environment of the lock you are trying to delete")
fs.Var(&cmdArgs.application, "application", "the application of the lock you are trying to delete")

if err := fs.Parse(args); err != nil {
return nil, fmt.Errorf("error while parsing command line arguments, error: %w", err)
Expand All @@ -158,7 +156,7 @@ func convertToDeleteAppLockParams(cmdArgs DeleteAppLockCommandLineArguments) (Lo
LockId: cmdArgs.lockId.Values[0],
Environment: cmdArgs.environment.Values[0],
Application: cmdArgs.application.Values[0],
UseDexAuthentication: cmdArgs.useDexAuthentication,
UseDexAuthentication: false,
}
return &rp, nil
}
Expand Down

0 comments on commit 177eb15

Please sign in to comment.