Plugin Developer Discussion

Discussion for FogBugz Plugin developers

CPersonQuery issue

I'm trying to write a plugin that updates a bug comments from the comments entered into vault source control checkins.
The whole thing works great in that i can accept the comments and various info being posted into my raw page interface and i can update the CBug instance for the case for any user as long as i know the users index to pass to the CBug.Commit() method.
However, where i get stuck is that the CPersonQuery appears to ignore the IgnorePermissions property being set to true.

My code:

  CPersonQuery peopleQ = api.Person.NewPersonQuery();
  peopleQ.IgnorePermissions = true;
  CPerson[] people = peopleQ.List();
  peopleQ.IgnorePermissions = false;

works perfectly if i access the page from a browser where i am already logged into fogbugz but when i access it from my application it fails to return me the single matching CPerson object in the array.

This is a bit of a showstopper for me because i am relying on the fact that our vault and fogbugz servers use active directory and i can get the username of the person who checked in the files from vault, i really want to be able to update the fogbugz case as that user too.

Am i doing something wrong or is this just not working the way it's meant to work?


Matt Stephens Send private email
Friday, February 12, 2010
I found the information about using the xml api to get a token which can be passed on the URL to authenticate a page request so i can work around this by accessing my plugins raw page handler as our admin user.
Matt Stephens Send private email
Monday, February 15, 2010
Hi Matt-
Sorry about the delay in getting back to you.
You're right, this looks like a bug in the CPersonQuery object. I have opened a case and we'll get this fixed up in a service release.
Brett Kiefer Send private email
Monday, February 15, 2010

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz