1067: If user does not have reviews.can_edit_reviewrequest then post-review --submit-as fails with a mysterious error

jeremy*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Sept. 13, 2009
Create a new user, give them reviews|Submit as another user permission.
Run a post-review command like:
python post-review --server="http://my-review-board.example.com"
--username me --password mypw --target-groups=AGroup --publish
--submit-as=notme --revision-range=123:456 --summary="The summary"
--repository-url="http://svn.example.com/blahbhal" -d -d -d -d

You get error, 
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>500 - Internal Server Error | Review Board</title>
 </head>
 <body>
  <h1>Something broke! (Error 500)</h1>
  <p>
   It appears something broke when you tried to go to here. This is either
   a bug in Review Board or a server configuration error. Please report
   this to your administrator.
  </p>
 </body>
</title>

Which actually comes from:  File
"/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2-py2.5.egg/reviewboard/webapi/json.py",
line 848, in review_request_draft_set
    draft.save()

Because if the permission check fails, _prepare_draft returns a
WebAPIResponseError object instead of a draft object.
chipx86
#1 chipx86
  • +Confirmed
  • +Milestone-Release1.0.x
    +Component-API
chipx86
#2 chipx86
Fixed on release-1.0.x in r0de7628
  • -Confirmed
    +Fixed
  • +chipx86