diff options
Diffstat (limited to 'src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r-- | src/main/java/com/juick/service/UserServiceImpl.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java index a7ea5c5f..442bd03c 100644 --- a/src/main/java/com/juick/service/UserServiceImpl.java +++ b/src/main/java/com/juick/service/UserServiceImpl.java @@ -66,6 +66,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { } user.setVerified(rs.getLong(6) > 0); user.setPremium(rs.getInt(7) > 0); + user.setAdmin(adminUsers.contains(user.getName())); return user; } } @@ -595,11 +596,6 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { getJdbcTemplate().update("UPDATE users SET last_seen=? WHERE id=?", toDateTime(Instant.now().atOffset(ZoneOffset.UTC)), user.getUid()); } - @Override - public boolean isAdminUser(User user) { - return adminUsers.contains(user.getName()); - } - @Transactional(readOnly = true) @Override public Optional<ExternalToken> getTwitterToken(final int uid) { |