D6198: Add KAuth support to delete operation

Chinmoy Ranjan Pradhan noreply at phabricator.kde.org
Mon Jun 12 16:45:24 UTC 2017


chinmoyr created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  This patch makes it possible to delete root owned files and folders.
  To avoid any accidental deletion a warning is shown informing the user about the write-protection. The warnings can either be from KIO::JobUIDelegate or from file ioslave because there arise two cases while deleting with escalated privilege.
  
  Case 1: The parent dir of the item(s) to be deleted is write-protected 
  In this case the warning will be shown from JobUIDelegate. Since this will be a privileged operation, the warning dialog won't have the "Don't show again" checkbox. Following the warning the polkit authentication dialog will be shown if the user has not authenticated himself otherwise if the delete was performed within the threshold time the file will be deleted imediately.
  
  Case 2: The parent isn't write-protected but some of the children are
  In this case the regular warning is shown from JobUIDelegate and ioslave performs the delete operation. It continues till a root owned item is encountered. At this point either the polkit authentication dialog is shown or the warning from the ioslave.
  
  Depends on https://phabricator.kde.org/D6197

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D6198

AFFECTED FILES
  src/core/jobuidelegateextension.h
  src/ioslaves/file/file.cpp
  src/ioslaves/file/file_unix.cpp
  src/ioslaves/file/kauth/file.actions
  src/ioslaves/file/kauth/helper.cpp
  src/ioslaves/file/kauth/helper.h
  src/widgets/jobuidelegate.cpp

To: chinmoyr, elvisangelaccio, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170612/f26b612a/attachment.html>


More information about the Kde-frameworks-devel mailing list