Commit 181a2e1c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

user has info about terms of use consent

parent e7ce0dac
......@@ -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),
;
/**
......
......@@ -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;
}
}
alter table user_table add column terms_of_use_consent boolean default false;
......@@ -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 {
......
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