mikitex70 / redmine_drawio

Macro plugin to embed draw.io diagrams into Redmine wiki pages
MIT License
121 stars 51 forks source link

Error saving diagram: Forbidden #104

Closed jwalkerbg closed 2 years ago

jwalkerbg commented 2 years ago

Hi, I am running Redmine 4.2.3 and drawio plugin 1.2.0, on Windows 10.

The problem is that the diagrams cannot be saved. The message from the browser is "localhost:3002 Error saving diagram: forbidden"

The log file have this record Started POST "/uploads.json?filename=myDiagram_1.png" for 127.0.0.1 at 2021-12-19 21:46:55 +0200 Processing by AttachmentsController#upload as JSON Parameters: {"filename"=>"myDiagram_1.png"} Current user: anonymous Filter chain halted as :authorize_global rendered or redirected Completed 403 Forbidden in 16ms (ActiveRecord: 7.0ms)

The important thing here is "Current user: anonymous". However, the curent user is not anonymous. Instead the current user is a logged user. So where is the problem? In Redmine or in the plugin drawio?

mikitex70 commented 2 years ago

Hi @jwalkerbg, have you enabled the REST API in the global Redmine settings? It's documented in the README.md. Without the REST API the attachments cannot be managed...

jwalkerbg commented 2 years ago

Thank you. REST API was not enabled. It is clearly written ... but sometimes there is no one to read...