ocket8888 commented on a change in pull request #4764:
URL: https://github.com/apache/trafficcontrol/pull/4764#discussion_r436861335
##########
File path: infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
##########
@@ -24,23 +24,27 @@
use Crypt::ScryptKDF qw{ scrypt_hash };
if ($#ARGV < 2) {
- die "Usage: $ARGV[0] <username> <password> <role>\n";
+ die "Usage: $ARGV[0] USERNAME PASSWORD [ROLE] [TENANT] [EMAIL]
[FULL_NAME]\n";
}
my $username = shift // 'admin';
my $password = shift or die "Password is required\n";
my $role = shift // 'admin';
my $tenant = shift // 'root';
+my $email = shift // '[email protected]';
+my $full_name = shift // 'James Cole'
Review comment:
It could be, but that's following the pattern of allowing the script to
add a generic user to the database while defaulting to the "admin" user's
default information.
What about:
```perl
my $full_name = shift // $ENV{TO_ADMIN_FULL_NAME};
```
? And I'd wanna do the same thing with the email.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]