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
181a2e1c
Commit
181a2e1c
authored
May 25, 2018
by
Piotr Gawron
Browse files
user has info about terms of use consent
parent
e7ce0dac
Changes
4
Hide whitespace changes
Inline
Side-by-side
model/src/main/java/lcsb/mapviewer/model/user/ConfigurationElementType.java
View file @
181a2e1c
...
...
@@ -165,6 +165,11 @@ public enum ConfigurationElementType {
+
"(\"General overlays\") on this MINERVA server contain Protected Health Information (as defined in and subject to HIPAA)."
,
""
,
ConfigurationElementEditType
.
STRING
,
false
),
/**
* File where legend 4/4 is stored.
*/
TERMS_OF_USE
(
"Terms of use file"
,
"resources/other/terms_of_use.pdf"
,
ConfigurationElementEditType
.
URL
,
false
),
;
/**
...
...
model/src/main/java/lcsb/mapviewer/model/user/User.java
View file @
181a2e1c
...
...
@@ -92,6 +92,9 @@ public class User implements Serializable {
*/
private
boolean
removed
=
false
;
@Column
(
name
=
"terms_of_use_consent"
)
private
boolean
termsOfUseConsent
=
false
;
/**
* Set of user privileges.
*/
...
...
@@ -333,4 +336,12 @@ public class User implements Serializable {
this
.
simpleColor
=
simpleColor
;
}
public
boolean
isTermsOfUseConsent
()
{
return
termsOfUseConsent
;
}
public
void
setTermsOfUseConsent
(
boolean
termsOfUseConsent
)
{
this
.
termsOfUseConsent
=
termsOfUseConsent
;
}
}
persist/src/db/11.1.0/fix_db_20180525.sql
0 → 100644
View file @
181a2e1c
alter
table
user_table
add
column
terms_of_use_consent
boolean
default
false
;
rest-api/src/main/java/lcsb/mapviewer/api/users/UserRestImpl.java
View file @
181a2e1c
...
...
@@ -79,6 +79,7 @@ public class UserRestImpl {
columnsSet
.
add
(
"simpleColor"
);
columnsSet
.
add
(
"removed"
);
columnsSet
.
add
(
"privileges"
);
columnsSet
.
add
(
"termsOfUseConsent"
);
}
else
{
for
(
String
str
:
columns
.
split
(
","
))
{
columnsSet
.
add
(
str
);
...
...
@@ -108,8 +109,10 @@ public class UserRestImpl {
value
=
user
.
getMaxColor
();
}
else
if
(
column
.
equals
(
"simplecolor"
))
{
value
=
user
.
getSimpleColor
();
}
else
if
(
column
.
equals
(
"removed"
))
{
value
=
user
.
isRemoved
();
}
else
if
(
column
.
equals
(
"removed"
))
{
value
=
user
.
isRemoved
();
}
else
if
(
column
.
equals
(
"termsOfUseConsent"
))
{
value
=
user
.
isTermsOfUseConsent
();
}
else
if
(
column
.
equals
(
"privileges"
)
&&
admin
)
{
value
=
preparePrivileges
(
user
);
}
else
{
...
...
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