aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/model/User.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-04-26 09:34:29 +0300
committerGravatar Vitaly Takmazov2023-04-26 09:34:29 +0300
commitfc5f8e888c9ccfda7d739493c439437a917b9902 (patch)
treecb89cdb606b3296ef20c97b749a50d447b0d4a70 /src/main/java/com/juick/model/User.java
parent90201606bb485988f5a85cd578f3f5b8ecddf4db (diff)
Expose 'isAdmin' user property over API
Diffstat (limited to 'src/main/java/com/juick/model/User.java')
-rw-r--r--src/main/java/com/juick/model/User.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/com/juick/model/User.java b/src/main/java/com/juick/model/User.java
index 5f89ecfc..7f04a744 100644
--- a/src/main/java/com/juick/model/User.java
+++ b/src/main/java/com/juick/model/User.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2020, Juick
+ * Copyright (C) 2008-2023, Juick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -62,6 +62,8 @@ public class User implements Serializable {
private String description;
private final List<TagStats> tagStats;
private boolean premium;
+ @XmlTransient
+ private boolean admin;
public User() {
tokens = new ArrayList<>();
@@ -288,4 +290,12 @@ public class User implements Serializable {
public void setPremium(boolean premium) {
this.premium = premium;
}
+
+ public boolean isAdmin() {
+ return admin;
+ }
+
+ public void setAdmin(boolean admin) {
+ this.admin = admin;
+ }
}