My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 1067: If user does not have reviews.can_edit_reviewrequest then post-review --submit-as fails with a mysterious error
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  chip...@gmail.com
Closed:  Sep 2009


Sign in to add a comment
 
Reported by jeremy.b...@gmail.com, Apr 20, 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.
Comment 1 by project member chip...@gmail.com, Sep 4, 2009
(No comment was entered for this change.)
Status: Confirmed
Labels: Milestone-Release1.0.x Component-API
Comment 2 by project member chip...@gmail.com, Sep 13, 2009
Fixed on release-1.0.x in r0de7628
Status: Fixed
Owner: chipx86
Sign in to add a comment

Powered by Google Project Hosting