Commit 892cd76e authored by Keith Jolley's avatar Keith Jolley
Browse files

Prevent submitter overriding sender info in batch add.

parent decda6cf
#Written by Keith Jolley
#Copyright (c) 2010-2014, University of Oxford
#Copyright (c) 2010-2015, University of Oxford
#E-mail: keith.jolley@zoo.ox.ac.uk
#
#This file is part of Bacterial Isolate Genome Sequence Database (BIGSdb).
......@@ -1241,6 +1241,7 @@ sub _upload_data {
}
}
my @history;
my $user_info = $self->{'datastore'}->get_user_info_from_username( $self->{'username'} );
foreach my $record (@records) {
$record =~ s/\r//g;
my @profile;
......@@ -1256,6 +1257,8 @@ sub _upload_data {
push @value_list, "'today'";
} elsif ( $field eq 'curator' ) {
push @value_list, $self->get_curator_id;
} elsif ( $field eq 'sender' && $user_info->{'status'} eq 'submitter'){
push @value_list, $self->get_curator_id;
} elsif ( defined $fieldorder{$field}
&& defined $data[ $fieldorder{$field} ]
&& $data[ $fieldorder{$field} ] ne 'null'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment