<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6831" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>If you agree that showing an error message after hitting Cancel on the kauth prompt is suboptimal (I didn't actually test it), then it seems to me that a simple solution to turn <tt style="background: #ebebeb; font-size: 13px;">bool isPrivilegeOperationAllowed()</tt> into a method that returns an enum? (same for <tt style="background: #ebebeb; font-size: 13px;">execWithElevatedPrivilege</tt>)</p>
<p>The values would be</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Allowed (-> proceed)</li>
<li class="remarkup-list-item">Not allowed / not supported ( -> show error)</li>
<li class="remarkup-list-item">Canceled (-> don't show error)</li>
</ul>
<p>It's already a string true/false in the socket, that's easily extendable.</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6831" rel="noreferrer">https://phabricator.kde.org/D6831</a></div></div><br /><div><strong>To: </strong>chinmoyr, dfaure, Frameworks<br /><strong>Cc: </strong>Frameworks<br /></div>