Skip to content

Commit

Permalink
Fix canto_add.pl --person
Browse files Browse the repository at this point in the history
We don't need passwords anymore
  • Loading branch information
kimrutherford committed Mar 13, 2024
1 parent 6a904f0 commit d853ac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions lib/Canto/Track/LoadUtil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,8 @@ sub get_person
my $self = shift;
my $name = shift;
my $email_address = shift;
my $role_cvterm = shift;
my $password = shift;
my $orcid = shift;
my $role_cvterm = shift;

my $schema = $self->schema();

Expand All @@ -702,22 +701,14 @@ sub get_person
if (!defined $name || length $name == 0) {
die "name not set for $email_address\n";
}
if (!defined $password) {
die "no password passed to get_person()\n";
}
if (!$password) {
die "empty password passed to get_person()\n";
}
if (!$role_cvterm) {
die "no role passed to get_person()\n";
}

my $hashed_password = sha1_base64($password);

my %args = (
name => $name,
email_address => $email_address,
password => $hashed_password,
password => '',
role => $role_cvterm,
);

Expand Down
2 changes: 1 addition & 1 deletion script/canto_add.pl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ sub usage

my $role = $load_util->find_cvterm(cv_name => 'Canto user types',
name => $role_name);
$load_util->get_person($name, $email_address, $orcid, '', $role);
$load_util->get_person($name, $email_address, $orcid, $role);
}

if ($add_session) {
Expand Down

0 comments on commit d853ac0

Please sign in to comment.