aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/UserServiceImpl.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-22 06:55:37 +0300
committerGravatar Vitaly Takmazov2021-08-22 06:55:37 +0300
commit03d42d6e6ccaee4ff9d2a0808e51e5f9f0dc18c3 (patch)
treea3a6f5ef310b2130ff6fdf541f34facecd8bf2b3 /src/main/java/com/juick/service/UserServiceImpl.java
parent9100b5bda037fcd1b051b98585744077132320bc (diff)
ActivityPub: return Application profile for service user
Diffstat (limited to 'src/main/java/com/juick/service/UserServiceImpl.java')
-rw-r--r--src/main/java/com/juick/service/UserServiceImpl.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java
index 7d215260..1594936a 100644
--- a/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/src/main/java/com/juick/service/UserServiceImpl.java
@@ -57,6 +57,9 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Value("${juick.admin_users:}")
List<String> adminUsers;
+ @Value("${service_user:juick}")
+ private String serviceUser;
+
private class UserMapper implements RowMapper<User> {
@Override
public User mapRow(@Nonnull ResultSet rs, int rowNum) throws SQLException {
@@ -663,4 +666,9 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
public boolean isAdminUser(User user) {
return adminUsers.contains(user.getName());
}
+
+ @Override
+ public boolean isServiceUser(User user) {
+ return user.getName().equals(serviceUser);
+ }
}