diff options
author | Vitaly Takmazov | 2022-02-17 10:17:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-02-17 10:17:14 +0300 |
commit | b38edd75f5142da515e46dbbc667162186a77653 (patch) | |
tree | 3a24f5f993d3b25fc5cfd02f92c680ed3ad77ade /src/main/java/com/juick/www | |
parent | d95517f241f415c8603faac93f4efc8eea14dd15 (diff) |
Do not allow to delete Telegram when it is the only social account
Diffstat (limited to 'src/main/java/com/juick/www')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Settings.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java index 8fefadc2..1dc5f1c3 100644 --- a/src/main/java/com/juick/www/controllers/Settings.java +++ b/src/main/java/com/juick/www/controllers/Settings.java @@ -248,7 +248,9 @@ public class Settings { result = "<p><a href=\"/settings\">Back</a></p>"; break; case "telegram-del": - telegramService.deleteTelegramUser(visitor.getUid()); + if (userService.canDeleteTelegramUser(visitor)) { + telegramService.deleteTelegramUser(visitor.getUid()); + } result = "<p><a href=\"/settings\">Back</a></p>"; break; case "facebook-disable": |