prevent demo account from registering custom js code

This commit is contained in:
Athou
2024-01-07 17:19:32 +01:00
parent 662d0f754f
commit 039e91414e

View File

@@ -153,7 +153,7 @@ public class UserREST {
s.setShowRead(settings.isShowRead());
s.setScrollMarks(settings.isScrollMarks());
s.setCustomCss(settings.getCustomCss());
s.setCustomJs(settings.getCustomJs());
s.setCustomJs(CommaFeedApplication.USERNAME_DEMO.equals(user.getName()) ? "" : settings.getCustomJs());
s.setLanguage(settings.getLanguage());
s.setScrollSpeed(settings.getScrollSpeed());
s.setAlwaysScrollToEntry(settings.isAlwaysScrollToEntry());