<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/126724/">https://git.reviewboard.kde.org/r/126724/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 25th, 2017, 11:53 p.m. CET, <b>Albert Astals Cid</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Martin any reason this was not commmited? Should I?</p></pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If I remember correctly it depends on a newer polkit-qt functionality and polkit-qt hasn't seen a release yet. Unfortunately I cannot really check as the diff now only shows whitespace changes (yay for reviewboard to break the diffs)</p></pre>
<br />










<p>- Martin</p>


<br />
<p>On January 12th, 2016, 10:36 a.m. CET, Martin Gräßlin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Frameworks, Dario Freddi and David Edmundson.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated Jan. 12, 2016, 10:36 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kauth
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The Polkit backend is able to retrieve the calling user. As this is
a useful information for a helper the information can be exposed in
the AuthBackend and be retrieved through the HelperSupport.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">a helper with:
    ActionReply KScreenLockerAuthHelper::save(const QVariantMap &args)
    {
    auto user = KAuth::HelperSupport::callingUser();</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #008000; font-weight: bold">QFile</span> <span style="color: #008000; font-weight: bold">file</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QStringLiteral</span><span style="color: #666666">(</span><span style="color: #BA2121">"/tmp/authtest"</span><span style="color: #666666">));</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.open</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QIODevice</span><span style="color: #666666">:</span><span style="color: #AA22FF">:WriteOnly</span><span style="color: #666666">);</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">user-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">homeDir</span><span style="color: #666666">()</span><span style="color: #0000FF; font-weight: bold">.toUtf8</span><span style="color: #666666">());</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #BA2121">"\n"</span><span style="color: #666666">);</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">user-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">loginName</span><span style="color: #666666">()</span><span style="color: #0000FF; font-weight: bold">.toUtf8</span><span style="color: #666666">());</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #BA2121">"\n"</span><span style="color: #666666">);</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QByteArray</span><span style="color: #666666">:</span><span style="color: #AA22FF">:number</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">user-</span><span style="color: #666666">></span><span style="color: #008000; font-weight: bold">userId</span><span style="color: #666666">()</span><span style="color: #0000FF; font-weight: bold">.nativeId</span><span style="color: #666666">()));</span>
<span style="color: #008000; font-weight: bold">file</span><span style="color: #0000FF; font-weight: bold">.write</span><span style="color: #666666">(</span><span style="color: #BA2121">"\n"</span><span style="color: #666666">);</span>

<span style="color: #008000; font-weight: bold">return</span> <span style="color: #008000; font-weight: bold">ActionReply</span><span style="color: #666666">:</span><span style="color: #AA22FF">:SuccessReply</span><span style="color: #666666">();</span>
<span style="border: 1px solid #FF0000">}</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">created the file /tmp/authtest with the following content:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>/home/martin
martin
1000
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Which matches my user.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/AuthBackend.h <span style="color: grey">(c67a706dda107c9815e3c3f74c628fed6d2e4dcc)</span></li>

 <li>src/AuthBackend.cpp <span style="color: grey">(ff91dd580919af9046b3f3d26f340885d54d370e)</span></li>

 <li>src/CMakeLists.txt <span style="color: grey">(1b6930d1db89f6ecc1223772b6632c57762f829f)</span></li>

 <li>src/backends/polkit-1/Polkit1Backend.cpp <span style="color: grey">(78ee5bb6d97d9d83beec21e197a947dfc994b2a9)</span></li>

 <li>src/kauthhelpersupport.h <span style="color: grey">(2828ec21aa00b7fb35dcf19db7f3869158e85b1d)</span></li>

 <li>src/kauthhelpersupport.cpp <span style="color: grey">(c2a88d7cc574eb6ab092f0981b828fd4c68ba025)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/126724/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>