feat(navigation): let apps remove navigation entries - #64858
Open
karlitschek wants to merge 1 commit into
Open
karlitschek wants to merge 1 commit into
karlitschek wants to merge 1 commit into
Conversation
Apps can add navigation entries (LoadAdditionalEntriesEvent) but not take any away. An app that gives some users access to itself only, like the Social app's self-registered external users, then has to hide the app menu with CSS while the page still carries every app in its initial state. NavigationManager::getAll() now dispatches NavigationEntriesFilterEvent with the entries of the requested type before sorting them. A listener can only remove entries: entries it adds or changes are ignored, so the event cannot be used to rewrite another app's link. The event is only dispatched when an app listens for it. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
karlitschek
requested review from
Altahrim,
leftybournes,
provokateurin and
salmart-dev
and removed request for
a team
September 27, 2026 16:43
Member
Author
|
The idea is that people can register themselves for the Social app and can use the normal login and Platform. But this users should have only access to Social and not Files or Dashboard or other standard apps. So it would be great to hide the not relevant apps. This should also be backported. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apps can add navigation entries through
LoadAdditionalEntriesEventbut cannot take any away. An app that gives some users access to itself only, such as Social's self-registered external users (nextcloud/social branchfeat/external-users), then has to hide the app menu with CSS while the page still lists every app in its initial state.NavigationManager::getAll()now dispatchesNavigationEntriesFilterEventwith the entries of the requested type before sorting. Listeners can only remove entries; added or changed entries are ignored. The event is only dispatched when an app listens for it.Tests: three new cases in
tests/lib/NavigationManagerTest.php.AI disclosure: this change was written with Claude Code and reviewed by the contributor.
🤖 Generated with Claude Code