mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #1329] [MERGED] [Featute] Add optional web app flag which requires a login for every action #1567
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1567
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1329
Author: @theatischbein
Created: 5/5/2025
Status: ✅ Merged
Merged: 8/25/2025
Merged by: @binwiederhier
Base:
main← Head:feat_optional_require_login📝 Commits (1)
03aeb70feat: Add optional web app flag which requires a login for every action📊 Changes
10 files changed (+39 additions, -13 deletions)
View changed files
📝
cmd/serve.go(+1 -0)📝
docs/config.md(+1 -0)📝
server/config.go(+1 -0)📝
server/server.go(+1 -0)📝
server/server.yml(+2 -0)📝
server/types.go(+1 -0)📝
web/public/static/langs/en.json(+2 -0)📝
web/src/components/Navigation.jsx(+7 -1)📝
web/src/components/Notifications.jsx(+7 -2)📝
web/src/components/Preferences.jsx(+16 -10)📄 Description
Problem
I have read #238 and was also notified about #1316 (which I disagree too because the ACL does not allow it).
I do understand that the web app is supposed to be a dump client, but I still want to manage who uses my server ressources. Since the web app has a login it feels not suitable to add an additonal login step like BASIC-AUTH.
But I see the point of #238 that the web app can be used to subscribe to other ntfy servers, which might not be wanted.
Also I find it a bit confusing in my setup that there are options in the NavigationBar to subscribe or publish notifications on my servers without a login, but the ACL does not allow it. And I do not want others (without an account) to use my instance to subscribe to external server.
Changes
So I added the flag
require_login/require-login/NTFY_REQUIRE_LOGIN(Default:false).If the flag is enabled and there is no Login:
/settingsredirects back to main pageMissing
I only added the translation for English.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.