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
af01620c
Commit
af01620c
authored
Sep 12, 2018
by
Piotr Gawron
Browse files
Merge branch 'devel_12.0.x' into devel_12.1.x
parents
d84dff3b
5c8ed669
Pipeline
#6358
passed with stage
in 1 minute and 51 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
af01620c
minerva
(
12.1.0
~
beta
.0
)
experimental
;
urgency
=
medium
*
Small
improvement
:
option
to
remove
additional
overlays
generated
by
custom
*
Small
improvement
:
option
to
remove
additional
overlays
generated
by
custom
semantic
zoom
*
Small
improvement
:
'Reduced modulation'
edge
was
displayed
differently
in
*
Small
improvement
:
'Reduced modulation'
edge
was
displayed
differently
in
CellDesigner
and
Minerva
*
Small
improvement
:
user
-
friendly
documentation
for
plugin
URL
field
*
Small
improvement
:
plugins
have
to
access
information
about
active
submap
...
...
@@ -24,6 +24,17 @@ minerva (12.1.0~alpha.0) experimental; urgency=medium
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 03 Aug 2018 10:00:00 +0200
minerva (12.0.4) stable; urgency=medium
* Bug fix: CellDesigner modifications that are drawn as reaction are handled
properly (like catalysis)
* Bug fix: Removing of guest (anonymous) account is forbidden - system is
unstable after removing such user
* Bug fix: Tair database moved to https
* Bug fix: Taxnomy database changed html output that resulted in problems
with resolving species name to the id
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 12 Sep 2018 17:00:00 +0200
minerva (12.0.3) stable; urgency=medium
* Bug fix: SBML model annotations caused errors on upload
* Bug fix: Export of some models to SBML didn'
t
work
properly
...
...
annotation/src/main/java/lcsb/mapviewer/annotation/services/TaxonomyBackend.java
View file @
af01620c
...
...
@@ -108,7 +108,7 @@ public class TaxonomyBackend extends CachableInterface implements IExternalServi
queryTerm
=
URLEncoder
.
encode
(
queryTerm
,
"UTF-8"
);
String
url
=
"https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?lvl=0&name="
+
queryTerm
;
String
page
=
getWebPageContent
(
url
);
Pattern
idPattern
=
Pattern
.
compile
(
"
<em>
Taxonomy ID:
</em>
([0-9]+)"
);
Pattern
idPattern
=
Pattern
.
compile
(
"Taxonomy ID: ([0-9]+)"
);
Matcher
matcher
=
idPattern
.
matcher
(
page
);
if
(!
matcher
.
find
())
{
logger
.
warn
(
"Unknown organism: "
+
term
);
...
...
annotation/src/main/java/lcsb/mapviewer/annotation/services/annotators/TairAnnotator.java
View file @
af01620c
...
...
@@ -107,7 +107,7 @@ public class TairAnnotator extends ElementAnnotator implements IExternalService
* @return URL to TAIR page about the TAIR entry
*/
private
String
getTairUrl
(
String
tairId
)
{
return
"http://arabidopsis.org/servlets/TairObject?type=locus&name="
+
tairId
;
return
"http
s
://arabidopsis.org/servlets/TairObject?type=locus&name="
+
tairId
;
}
/**
...
...
frontend-js/src/main/js/gui/admin/UsersAdminPanel.js
View file @
af01620c
...
...
@@ -333,7 +333,11 @@ UsersAdminPanel.prototype.userToTableRow = function (user, row) {
}
row
[
5
]
=
"
<button name='showEditDialog' data='
"
+
user
.
getLogin
()
+
"
'><i class='fa fa-edit' style='font-size:17px'></i></button>
"
;
row
[
6
]
=
"
<button name='removeUser' data='
"
+
user
.
getLogin
()
+
"
'><i class='fa fa-trash-o' style='font-size:17px'></i></button>
"
;
var
disabled
=
""
;
if
(
user
.
getLogin
()
===
"
anonymous
"
)
{
disabled
=
"
disabled
"
;
}
row
[
6
]
=
"
<button name='removeUser'
"
+
disabled
+
"
data='
"
+
user
.
getLogin
()
+
"
'><i class='fa fa-trash-o' style='font-size:17px'></i></button>
"
;
return
row
;
};
...
...
persist/src/db/12.0.4/fix_db_20180830.sql
0 → 100644
View file @
af01620c
-- empty file to force directory to be commited to git repo
rest-api/src/main/java/lcsb/mapviewer/api/BaseController.java
View file @
af01620c
...
...
@@ -36,6 +36,8 @@ public abstract class BaseController {
return
createErrorResponse
(
"Object not found."
,
e
.
getMessage
(),
new
HttpHeaders
(),
HttpStatus
.
NOT_FOUND
);
}
else
if
(
e
instanceof
ObjectExistsException
)
{
return
createErrorResponse
(
"Object already exists."
,
e
.
getMessage
(),
new
HttpHeaders
(),
HttpStatus
.
CONFLICT
);
}
else
if
(
e
instanceof
OperationNotAllowedException
)
{
return
createErrorResponse
(
"Operation not allowed."
,
e
.
getMessage
(),
new
HttpHeaders
(),
HttpStatus
.
METHOD_NOT_ALLOWED
);
}
else
if
(
e
instanceof
QueryException
)
{
logger
.
error
(
e
,
e
);
return
createErrorResponse
(
"Query server error."
,
e
.
getMessage
(),
new
HttpHeaders
(),
HttpStatus
.
BAD_REQUEST
);
...
...
rest-api/src/main/java/lcsb/mapviewer/api/OperationNotAllowedException.java
0 → 100644
View file @
af01620c
package
lcsb.mapviewer.api
;
/**
* Thrown when API operation is not allowed, but operation is valid. This can
* happen when user tries to remove default map.
*
* @author Piotr Gawron
*
*/
public
class
OperationNotAllowedException
extends
QueryException
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* Default constructor.
*
* @param message
* error message
*/
public
OperationNotAllowedException
(
String
message
)
{
super
(
message
);
}
/**
* Constructor with error message and parent exception.
*
* @param message
* error message
* @param reason
* parent exception that caused this one
*/
public
OperationNotAllowedException
(
String
message
,
Exception
reason
)
{
super
(
message
,
reason
);
}
}
rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
View file @
af01620c
...
...
@@ -31,6 +31,7 @@ import org.springframework.util.MultiValueMap;
import
lcsb.mapviewer.api.BaseRestImpl
;
import
lcsb.mapviewer.api.ObjectExistsException
;
import
lcsb.mapviewer.api.ObjectNotFoundException
;
import
lcsb.mapviewer.api.OperationNotAllowedException
;
import
lcsb.mapviewer.api.QueryException
;
import
lcsb.mapviewer.api.projects.models.publications.PublicationsRestImpl
;
import
lcsb.mapviewer.commands.ClearColorModelCommand
;
...
...
@@ -740,7 +741,7 @@ public class ProjectRestImpl extends BaseRestImpl {
throws
SecurityException
,
QueryException
{
Project
project
=
getProjectService
().
getProjectByProjectId
(
projectId
,
token
);
if
(
getConfigurationService
().
getConfigurationValue
(
ConfigurationElementType
.
DEFAULT_MAP
).
equals
(
project
.
getProjectId
()))
{
throw
new
Query
Exception
(
"You cannot remove default map"
);
throw
new
OperationNotAllowed
Exception
(
"You cannot remove default map"
);
}
getProjectService
().
removeProject
(
project
,
path
,
true
,
token
);
return
getProject
(
projectId
,
token
);
...
...
rest-api/src/main/java/lcsb/mapviewer/api/users/UserRestImpl.java
View file @
af01620c
...
...
@@ -14,7 +14,9 @@ import org.springframework.util.MultiValueMap;
import
lcsb.mapviewer.api.BaseRestImpl
;
import
lcsb.mapviewer.api.ObjectNotFoundException
;
import
lcsb.mapviewer.api.OperationNotAllowedException
;
import
lcsb.mapviewer.api.QueryException
;
import
lcsb.mapviewer.common.Configuration
;
import
lcsb.mapviewer.common.exception.InvalidArgumentException
;
import
lcsb.mapviewer.model.Project
;
import
lcsb.mapviewer.model.map.MiriamType
;
...
...
@@ -622,7 +624,9 @@ public class UserRestImpl extends BaseRestImpl {
throw
new
SecurityException
(
"Access denied"
);
}
if
(
user
==
null
)
{
throw
new
QueryException
(
"user doesn't exists"
);
throw
new
ObjectNotFoundException
(
"user doesn't exists"
);
}
else
if
(
user
.
getLogin
().
equals
(
Configuration
.
ANONYMOUS_LOGIN
))
{
throw
new
OperationNotAllowedException
(
"guest account cannot be removed"
);
}
getUserService
().
deleteUser
(
user
);
return
okStatus
();
...
...
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