Skip to content
Snippets Groups Projects
Commit 89798df2 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Do not expose username for Answer/InterposedQuestion to API

parent 8a28c3e4
No related merge requests found
package de.thm.arsnova.entities; package de.thm.arsnova.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class Answer { public class Answer {
private String _id; private String _id;
...@@ -86,6 +88,10 @@ public class Answer { ...@@ -86,6 +88,10 @@ public class Answer {
this.piRound = piRound; this.piRound = piRound;
} }
/* TODO: use JsonViews instead of JsonIgnore when supported by Spring (4.1)
* http://wiki.fasterxml.com/JacksonJsonViews
* https://jira.spring.io/browse/SPR-7156 */
@JsonIgnore
public final String getUser() { public final String getUser() {
return user; return user;
} }
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
package de.thm.arsnova.entities; package de.thm.arsnova.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class InterposedQuestion { public class InterposedQuestion {
private String _id; private String _id;
...@@ -85,6 +87,10 @@ public class InterposedQuestion { ...@@ -85,6 +87,10 @@ public class InterposedQuestion {
this.timestamp = timestamp; this.timestamp = timestamp;
} }
/* TODO: use JsonViews instead of JsonIgnore when supported by Spring (4.1)
* http://wiki.fasterxml.com/JacksonJsonViews
* https://jira.spring.io/browse/SPR-7156 */
@JsonIgnore
public String getCreator() { public String getCreator() {
return creator; return creator;
} }
......
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