Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
9b8e0532
Commit
9b8e0532
authored
Aug 26, 2019
by
Piotr Gawron
Browse files
validation of organism id added
parent
f2846ad5
Pipeline
#13135
passed with stage
in 11 minutes and 6 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
9b8e0532
...
...
@@ -9,6 +9,7 @@ minerva (14.0.0~beta.0) unstable; urgency=low
* Bug fix: fetching list of miRnas resulted sometimes in "Internal Server
Error" (#889)
* Bug fix: user without admin right can accept terms of service (#893)
* Bug fix: edit project dialog verifies organism id (#914)
* Bug fix: user without admin or curator privileges shouldn'
t
be
able
to
check
logs
(#
894
)
*
Bug
fix
:
user
without
admin
or
curator
privileges
had
issues
with
accesing
...
...
frontend-js/src/main/js/gui/admin/EditProjectDialog.js
View file @
9b8e0532
...
...
@@ -300,9 +300,23 @@ EditProjectDialog.prototype.createGeneralTabContent = function () {
content
:
"
<input name='projectOrganism'/>
"
,
xss
:
false
,
onchange
:
function
()
{
var
id
=
$
(
"
[name='projectOrganism']
"
,
this
).
val
();
var
project
=
self
.
getProject
();
project
.
setOrganism
(
prepareMiriamData
(
"
TAXONOMY
"
,
$
(
"
[name='projectOrganism']
"
,
this
).
val
()));
return
self
.
updateProject
(
project
);
GuiConnector
.
showProcessing
();
return
self
.
getServerConnector
().
getTaxonomy
({
id
:
id
}).
catch
(
function
()
{
if
(
id
!==
""
)
{
var
newId
=
""
;
if
(
project
.
getOrganism
()
!==
undefined
)
{
newId
=
xss
(
project
.
getOrganism
().
getResource
());
}
$
(
"
[name='projectOrganism']
"
,
this
).
val
(
newId
);
$
(
"
[name='projectOrganism']
"
,
this
).
focus
();
throw
new
ValidationError
(
"
Invalid taxonomy id:
"
+
id
);
}
}).
then
(
function
()
{
project
.
setOrganism
(
prepareMiriamData
(
"
TAXONOMY
"
,
id
));
return
self
.
updateProject
(
project
);
}).
catch
(
GuiConnector
.
alert
).
finally
(
GuiConnector
.
hideProcessing
);
}
}));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment