Bug 498981

Summary: Don't open a new tab for "Open as Administrator" or close it after use
Product: [Applications] dolphin Reporter: Damglador <vse.stopchanskyi>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: bugseforuns, kfm-devel, nate
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Damglador 2025-01-21 22:21:12 UTC
SUMMARY
Even though it's rare that I have to open folders within root directories, it still happens. Managing root folders in Dolphin is annoying, because by default it can't do anything in there, and you have to "Open as Administrator" the issue is that it creates a new tab for this for no reason and doesn't close the old one or the new one after admin permissions run out, creating a lot of clutter and confusing. 

STEPS TO REPRODUCE
1. Go to / or any folder that is not in /home
2. Do "Open as Administrator"

OBSERVED RESULT
Every time it opens a new tab that will continue existing even when it no longer has root access

EXPECTED RESULT
The new tab should be closed after it loses admin permissions, or it should just replace the old tab to avoid confusion and clutter

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
Comment 1 Damglador 2025-02-21 20:21:52 UTC
This is also an inconsistent behavior. The other way to work as administrator in Dolphin is a banner that pops up sometimes above the file views, it happens is admin permissions run out, or if you enter some folders (for me, it's /root, which has set "No access" for "Others" in permissions). If you use the "Work as admin" button on the banner, it will actually just escalate permissions of the current tab to root, without opening an additional tab.
Comment 2 Damglador 2025-03-03 21:44:54 UTC
In the menu -> View -> Works as admin also just elevates permissions of the current tab and doesn't open a new one.