┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/admin/bar.cpp
AgeCommit message (Collapse)Author
2024-07-22Notify users if authorization is required to proceedFelix Ernst
Previous to this commit entering a folder without read access would show the non-descriptive error message "Could not enter folder". If the user actually is not allowed to view the contents of the folder, this is indeed true and this commit will preserve this message as is. However, if an admin protocol is installed, users can actually view the contents of most folders after authorizing themselves as administrators. So this commit changes the error message in those specific circumstances to instead read "Authorization required to enter this folder." and provide a button to authorize themselves. This button is the "Act as Administrator" action. If no admin protocol is installed, this commit has no effect. The idea for this change came from Harald Sitter. I receive funding for changes like this by the Next Generation Internet Initiative, which (as I understand it) will no longer provide funds for future projects like this if the current EU draft budget goes through as it is.
2024-07-13Stop acting as admin when the authorization expiresFelix Ernst
Previously, the authorization just silently expired without any visible change. The surprise only came when the user tried to do any action, which immediately would show a password prompt. We don't want users to randomly type passwords into password prompts unexpectedly showing up. This commit avoids that. With this change, the view container visibly de-escalates privileges and shows a message explaining what happened. A method was implemented in kio-admin to make this possible. See: https://commits.kde.org/kio-admin/a2da29289d12ef845e2c1da17ed04c59f1c47762 This commit also improves some logic around the responsibility of hiding bars and activating view containers. This is also part of my project funded by the European Commission.
2024-05-23Use m-dash instead of a hyphenTomáš Hnyk
2024-05-20Add label to button for closing the admin barFelix Ernst
The exact effect of the button is not perfectly clear without a label because it could theoretically also have no effect other than dismissing the bar (which is not the case). This situation is clarified through this added label. The tooltip of the button is adapted to complement the new button label.
2024-05-11Add "Act as Administrator" toggle actionFelix Ernst
This commit adds an "Act as Administrator" toggle action to the View menu if kio-admin is installed. The action allows switching between acting as an admin with root-access or not. This was already possible in Dolphin when kio-admin is installed by editing the location bar directly. However this is somewhat unintuitive and there are no warnings at all about the dangers of acting as an administrator. This commit adds a warning dialog when triggering the action. It is somewhat explicit about the risks because this is in fact very dangerous. Furthermore, while acting on a view with administrative privileges, a bar above the view shows up that contains a warning. The bar can be closed to stop acting with elevated privileges. The warning dialog can be disabled and re-enabled from the Dolphin settings but only if the action is even available. There is a lot more to be done to further improve this feature both security-wise as well as when it comes to usability. But considering that we are already encouraging users to use this feature without any warnings at all, I feel like now is a good time to merge this. This work is part of a project funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology. As such, please contact me if you plan on doing related work so what you are doing doesn't collide with work I am being funded to do.