<p>Steven,</p>
<p>Bugzilla->user object can be used to find the details of the user in the current session, just check the objects methods<br>
Regards,<br>
Rojanu</p>
<div class="gmail_quote">On Jun 6, 2012 8:05 AM, "Steven Tierney" <<a href="mailto:steven_tierney@yahoo.co.uk">steven_tierney@yahoo.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div><span>Hi Marc,</span><div><br></div><div>Thanks for your quick reply.</div><div><br></div><div>I had a look at the links you suggested, thanks for them.</div>
<div><br></div><div>In my extension/Extension.pm file I try to get the logged in user and there is no problem, the logged in user & encrypted password can be found.</div><div><br></div><div>The problem I face is at the callback stage. Eg. The user types 3 characters into the field and that triggers the Javascript to issue a callback to the web service. </div>
<div><br></div><div>At
the callback time I try to do the find (in my extension/lib/WebService.pm file) but the logged in user is undefined. </div><div><br></div><div>I can't help thinking I'm missing something blindingly obvious! Do I need to pass in credentials when calling the webservice, so that the user can first be logged in here then the details I need can be found? That can be done but I don't want to be writing the user id and encrypted password to the page, or depending on a browser cookie. </div>
<div><br></div><div>I don't know what the proper 'bugzilla' methodology/workflow of using the web service is.</div><div><br></div><div>Anyway I am rambling on! If you could offer me further guidance it would be greatly appreciated.</div>
<div><br></div><div><br></div><div>Thanks,</div><div>---</div><div>Steven</div><div><br></div><div><br><br><div class="gmail_quote">On 5 June 2012 17:15, Marc Schumann <span dir="ltr"><<a href="mailto:wurblzap@gmail.com" style="color:rgb(17,85,204)" target="_blank">wurblzap@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Steven,<br><br>
use Bugzilla->user to find out whether the user is logged in (see <a href="http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla.html" style="color:rgb(17,85,204)" target="_blank">http://www.bugzilla.org/docs/<u></u>tip/en/html/api/Bugzilla.html</a>)<u></u>.<br>
Check out <a href="http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/User.html" style="color:rgb(17,85,204)" target="_blank">http://www.bugzilla.org/docs/<u></u>tip/en/html/api/Bugzilla/User.<u></u>html</a>, too -- there are some can_see_* methods which may be of use to you.<br>
<br>Further reading is at <a href="http://www.bugzilla.org/docs/tip/en/html/api/" style="color:rgb(17,85,204)" target="_blank">http://www.bugzilla.org/docs/<u></u>tip/en/html/api/</a>.<br><br> Good luck<font color="#888888"><br>
Marc</font><div><br><br><div class="gmail_quote">2012/6/5 Steven Tierney <span dir="ltr"><<a href="mailto:steven_tierney@yahoo.co.uk" style="color:rgb(17,85,204)" target="_blank">steven_tierney@yahoo.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br><br>I have developed a new extension for Bugzilla. It uses the web service to access previously entered bug information in order to suggest autocomplete data for custom fields. Using jQuery, it's fully configurable through Bugzilla web pages accessible from within the Administration area.<br>
<br>There are security implications here because it will potentially expose bug data which might otherwise be secure. For that reason I need advice on how to verify in the web service that<br>1. a user is logged in and,<br>
2. is cleared to access bug data.<br><br>I did check the Bugzilla source files but, not being very used to coding in Perl and not knowing how security
'works' in Bugzilla, I don't know where to start!<br><br>I wonder if anyone can point me towards some documentation or give advice / code snippets that may help.<br><br>The validation has to happen in the Webservice.pm file of the extension.<br>
<br><br>Thanks in advance!</blockquote></div></div></blockquote></div></div></div> </div></div></blockquote></div>