Project

General

Profile

Actions

Defect #9370

closed

Modifying time_entry gives 403 forbidden

Added by Pasi Oja-Nisula over 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2011-10-04
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I'm trying to modify a time entry. Here's the test program.

-------------------
from pyactiveresource.activeresource import ActiveResource

class TimeEntry(ActiveResource):
    _site = 'https://redmine.goodsign.fi'
    _user = 'myusername'
    _password = 'mypassword'
    _request_format = 'xml'

time_entries = TimeEntry.find()
print time_entries
entry = time_entries[0]
print entry.comments
entry.comments = "tesmi2" 
entry.save()
-------------------

Redmine log shows this:

Processing TimelogController#index to xml (for 172.23.195.2 at 2011-10-04 10:23:14) [GET]
Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"timelog"}
Rendering timelog/index
Completed in 30ms (View: 2, DB: 9) | 200 OK [https://redmine.goodsign.fi/time_entries.xml]

Processing TimelogController#update to xml (for 172.23.195.2 at 2011-10-04 10:23:15) [PUT]
Parameters: {"time_entry"=>{"comments"=>"tesmi2", "created_on"=>"2011-10-04T09:32:46+03:00", "activity"=>{"name"=>"Development", "id"=>"9"}, "id"=>"28", "project"=>{"name"=>"Test", "id"=>"7"}, "updated_on"=>"2011-10-04T09:32:46+03:00", "spent_on"=>"2011-10-04", "issue"=>{"id"=>"5047"}, "hours"=>"1.0", "user"=>{"name"=>"Pasi Oja-Nisula", "id"=>"4"}}, "format"=>"xml", "action"=>"update", "id"=>"28", "controller"=>"timelog"}
Filter chain halted as [:find_time_entry] rendered_or_redirected.
Completed in 16ms (View: 0, DB: 4) | 403 Forbidden [https://redmine.goodsign.fi/time_entries/28.xml]

Thanks!

Actions

Also available in: Atom PDF