aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Settings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Settings.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Settings.java4
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":