Cancel privilege operation for read-only target with the current user as owner
ClosedPublic

Authored by chinmoyr on Jul 29 2018, 4:58 PM.

Details

Summary

If the target file (in case of chown, chmod or utime) or parent dir of target
(for other actions) is owned by the user requesting privilege escalation then
it's better to cancel the file operation and ask user to retry after changing
permissions manually.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12788
Build 12806: arc lint + arc unit
chinmoyr created this revision.Jul 29 2018, 4:58 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 29 2018, 4:58 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
chinmoyr requested review of this revision.Jul 29 2018, 4:58 PM
ngraham accepted this revision.May 14 2019, 3:46 PM

Needs a rebase on master and the @since strings adjusted, but otherwise looks good to me.

src/core/global.h
248–251

5.59 now

250

5.59 now

This revision is now accepted and ready to land.May 14 2019, 3:46 PM
dfaure added inline comments.May 19 2019, 3:24 PM
src/core/global.h
248–251

no, not that one, it was already there ;)
The line was only modified to add a comma.

250

and a trailing comma (as allowed by C++11) so that it doesn't need to be modified next time :-)

@chinmoyr can you address @dfaure's remaining comments so we can get this in?

chinmoyr updated this revision to Diff 59748.Jun 13 2019, 6:56 PM

Updated frameworks version.