Commit 67a3e944 authored by Ivo Fokkema's avatar Ivo Fokkema

Use a setting for determining who gets to set the concluded variant effect,...

Use a setting for determining who gets to set the concluded variant effect, instead of having LEVEL_CURATOR set in different places.
- More of these type of settings will follow later.
parent 0533862c
......@@ -169,6 +169,7 @@ $_SETT = array(
// The see_nonpublic_data setting currently also defines the visibility
// of the status, created* and edited* fields.
'see_nonpublic_data' => (LOVD_plus? LEVEL_SUBMITTER : LEVEL_COLLABORATOR),
'set_concluded_effect' => (LOVD_plus? LEVEL_MANAGER : LEVEL_CURATOR),
'submit_new_data' => (LOVD_plus? LEVEL_MANAGER : LEVEL_SUBMITTER),
),
'gene_imprinting' =>
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-21
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -747,7 +747,7 @@ if (PATH_COUNT == 1 && ACTION == 'create') {
$_DATA['Genome']->buildFields());
// Prepare values.
$_POST['effectid'] = $_POST['effect_reported'] . ($_AUTH['level'] >= LEVEL_CURATOR? $_POST['effect_concluded'] : substr($_SETT['var_effect_default'], -1));
$_POST['effectid'] = $_POST['effect_reported'] . ($_AUTH['level'] >= $_SETT['user_level_settings']['set_concluded_effect']? $_POST['effect_concluded'] : substr($_SETT['var_effect_default'], -1));
// 2017-09-22; 3.0-20; Replacing the old API call to Mutalyzer with our new lovd_getVariantInfo() function.
// Don't bother with a fallback, this thing is more solid than Mutalyzer's service.
......@@ -2470,7 +2470,7 @@ if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && in_array(ACTION, array('edit', 'p
$_DATA['Genome']->buildFields());
// Prepare values.
$_POST['effectid'] = $_POST['effect_reported'] . ($_AUTH['level'] >= LEVEL_CURATOR? $_POST['effect_concluded'] : $zData['effectid']{1});
$_POST['effectid'] = $_POST['effect_reported'] . ($_AUTH['level'] >= $_SETT['user_level_settings']['set_concluded_effect']? $_POST['effect_concluded'] : $zData['effectid']{1});
if ($_AUTH['level'] >= LEVEL_CURATOR) {
$aFieldsGenome[] = 'owned_by';
$aFieldsGenome[] = 'statusid';
......
Markdown is supported
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