Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
5d0a570c
Commit
5d0a570c
authored
Sep 16, 2019
by
Piotr Gawron
Browse files
validation of project name added
parent
26e4bc2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
5d0a570c
minerva
(
14.0.0
~
beta
.2
)
unstable
;
urgency
=
low
*
Bug
fix
:
allow
user
to
remove
own
comments
(#
931
)
*
Bug
fix
:
validation
of
project
name
length
is
provided
(#
950
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Mon
,
16
Sep
2019
21
:
00
:
00
+
0200
...
...
frontend-js/src/main/js/gui/admin/AddProjectDialog.js
View file @
5d0a570c
...
...
@@ -1282,6 +1282,11 @@ AddProjectDialog.prototype.checkValidity = function () {
isValid
=
false
;
}
var
name
=
self
.
getName
();
if
(
name
.
length
>
255
)
{
error
+=
"
<li>name must be shorter than 256 characters</li>
"
;
isValid
=
false
;
}
var
rootExist
=
0
,
i
;
for
(
i
=
0
;
i
<
self
.
getZipEntries
().
length
;
i
++
)
{
...
...
rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
View file @
5d0a570c
...
...
@@ -276,6 +276,9 @@ public class ProjectRestImpl extends BaseRestImpl {
throw
new
QueryException
(
"You cannot modify projectId"
);
}
}
else
if
(
fieldName
.
equalsIgnoreCase
(
"name"
))
{
if
(
value
!=
null
&&
((
String
)
value
).
length
()
>
255
)
{
throw
new
QueryException
(
"name is too long"
);
}
project
.
setName
((
String
)
value
);
}
else
if
(
fieldName
.
equalsIgnoreCase
(
"notifyEmail"
))
{
project
.
setNotifyEmail
(
stringValue
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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