From 13201ce80c7d36a25626005def3ae8d758b1e946 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Sat, 25 Jan 2025 09:25:21 -0500 Subject: [PATCH 1/6] do not require curator privileges to turn off fuzzy search. --- mason/breeders_toolbox/add_accessions_dialogs.mas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mason/breeders_toolbox/add_accessions_dialogs.mas b/mason/breeders_toolbox/add_accessions_dialogs.mas index 78618895a7..d92e32445e 100644 --- a/mason/breeders_toolbox/add_accessions_dialogs.mas +++ b/mason/breeders_toolbox/add_accessions_dialogs.mas @@ -47,11 +47,11 @@ $editable_stock_props_definitions
-% if ( $user_role eq 'curator' ) { - -% } else { - -% } +%# if ( $user_role eq 'curator' ) { + +%# } else { +%# +%# }
Note: Use the fuzzy search to match similar names to prevent uploading of duplicate accessions. Fuzzy searching is much slower than regular search. Only a curator can disable the fuzzy search.
From d0f4cb808df26f509dbe7c865d2571e2b7887f69 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Sat, 25 Jan 2025 09:26:41 -0500 Subject: [PATCH 2/6] remove message about only curators can disable fuzzy search. --- mason/breeders_toolbox/add_accessions_dialogs.mas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mason/breeders_toolbox/add_accessions_dialogs.mas b/mason/breeders_toolbox/add_accessions_dialogs.mas index d92e32445e..fbc0c6ef7a 100644 --- a/mason/breeders_toolbox/add_accessions_dialogs.mas +++ b/mason/breeders_toolbox/add_accessions_dialogs.mas @@ -53,7 +53,7 @@ $editable_stock_props_definitions %# %# }
- Note: Use the fuzzy search to match similar names to prevent uploading of duplicate accessions. Fuzzy searching is much slower than regular search. Only a curator can disable the fuzzy search. + Note: Use the fuzzy search to match similar names to prevent uploading of duplicate accessions. Fuzzy searching is much slower than regular search.
From 3a86d6cb64b96f22df4f9042cdc2679f7b7c26a0 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Mon, 27 Jan 2025 17:25:35 -0500 Subject: [PATCH 3/6] Remove secondary check to allow non-curators to not use fuzzy search. --- lib/SGN/Controller/AJAX/Accessions.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/SGN/Controller/AJAX/Accessions.pm b/lib/SGN/Controller/AJAX/Accessions.pm index 2fec216059..231722c055 100644 --- a/lib/SGN/Controller/AJAX/Accessions.pm +++ b/lib/SGN/Controller/AJAX/Accessions.pm @@ -86,10 +86,10 @@ sub verify_accession_list_POST : Args(0) { my @organism_list = $organism_list_json ? @{_parse_list_from_json($c, $organism_list_json)} : []; my $do_fuzzy_search = $c->req->param('do_fuzzy_search'); - if ($user_role ne 'curator' && !$do_fuzzy_search) { - $c->stash->{rest} = {error=>'Only a curator can add accessions without using the fuzzy search!'}; - $c->detach(); - } + #if ($user_role ne 'curator' && !$do_fuzzy_search) { + # $c->stash->{rest} = {error=>'Only a curator can add accessions without using the fuzzy search!'}; + # $c->detach(); + #} if ($do_fuzzy_search) { $self->do_fuzzy_search($c, \@accession_list, \@organism_list); @@ -239,10 +239,10 @@ sub verify_accessions_file_POST : Args(0) { my $do_fuzzy_search = $user_role eq 'curator' && !$c->req->param('fuzzy_check_upload_accessions') ? 0 : 1; my $append_synonyms = !$c->req->param('append_synonyms') ? 0 : 1; - if ($user_role ne 'curator' && !$do_fuzzy_search) { - $c->stash->{rest} = {error=>'Only a curator can add accessions without using the fuzzy search!'}; - $c->detach(); - } + #if ($user_role ne 'curator' && !$do_fuzzy_search) { + # $c->stash->{rest} = {error=>'Only a curator can add accessions without using the fuzzy search!'}; + # $c->detach(); + #} # These roles are required by CXGN::UploadFile if ($user_role ne 'curator' && $user_role ne 'submitter' && $user_role ne 'sequencer' ) { From f18ad1766012be795c8603ab53208c30757a2dd2 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Thu, 30 Jan 2025 10:49:21 -0500 Subject: [PATCH 4/6] remove the check also from the file upload menu. --- mason/breeders_toolbox/add_accessions_dialogs.mas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mason/breeders_toolbox/add_accessions_dialogs.mas b/mason/breeders_toolbox/add_accessions_dialogs.mas index fbc0c6ef7a..9e2c06e5fb 100644 --- a/mason/breeders_toolbox/add_accessions_dialogs.mas +++ b/mason/breeders_toolbox/add_accessions_dialogs.mas @@ -87,11 +87,11 @@ $editable_stock_props_definitions
-% if ( $user_role eq 'curator' ) { - -% } else { - -% } +%# if ( $user_role eq 'curator' ) { + +%# } else { +%# +%# }
Note: Use the fuzzy search to match similar names to prevent uploading of duplicate accessions. Fuzzy searching is much slower than regular search. Only a curator can disable the fuzzy search.
From 278dbfdf5fbef0d48942abb6c069a9078aacc83a Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Fri, 31 Jan 2025 09:06:52 -0500 Subject: [PATCH 5/6] remove test for fuzzy search being checked and disabled for submitters. --- t/selenium2/breeders/accessions.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/selenium2/breeders/accessions.t b/t/selenium2/breeders/accessions.t index f73f693f0e..a67e777240 100644 --- a/t/selenium2/breeders/accessions.t +++ b/t/selenium2/breeders/accessions.t @@ -169,8 +169,8 @@ $t->while_logged_in_as("submitter", sub { $t->find_element_ok("add_accessions_link", "name", "find element add accessions link as submitter")->click(); my $fuzzy_checkbox = $t->find_element_ok("fuzzy_check", "id", "find fuzzy checkbox"); - is $fuzzy_checkbox->get_attribute('checked'), 1, 'fuzzy logic checkbox is checked for submitter'; - is $fuzzy_checkbox->get_attribute('disabled'), 1, 'fuzzy logic checkbox is disabled for submitter'; +# is $fuzzy_checkbox->get_attribute('checked'), 1, 'fuzzy logic checkbox is checked for submitter'; +# is $fuzzy_checkbox->get_attribute('disabled'), 1, 'fuzzy logic checkbox is disabled for submitter'; }); $t->driver->close(); From b72040ffbb2a02fd09abde9045154870bcba0aa6 Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Fri, 31 Jan 2025 09:15:16 -0500 Subject: [PATCH 6/6] add strict and adjust number of tests. --- t/selenium2/breeders/accessions.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/selenium2/breeders/accessions.t b/t/selenium2/breeders/accessions.t index a67e777240..63d5a43c71 100644 --- a/t/selenium2/breeders/accessions.t +++ b/t/selenium2/breeders/accessions.t @@ -1,6 +1,9 @@ + +use strict; + use lib 't/lib'; -use Test::More 'tests' => 48; +use Test::More 'tests' => 46; use SGN::Test::WWW::WebDriver; use Selenium::Remote::WDKeys 'KEYS';