Show proper error message when write access to repository is denied.

Description

when saving configuration with the context-aware config editor and write access in the repository is missing the JSON interface just produces a HTTP 500 error and a generic error message is displayed to the user.

in this case the JSON interface shoud produce a HTTP 403 error, allowing the editor GUI to display a proper message informing that write access ist not allowed.

Activity

Show:
Stefan Seifert
March 21, 2017, 3:59 AM

i've already extended the JSON interface to produce HTTP 403 error wen POSTing configuration changes.

can you enhance the error message to distinguish between HTTP 500 (generic error) and 403 (you are not allowed to write configuration changes).

one might consider checking the rights to write configuration already when loading the configuration and hide buttons like save and delete - but this is quite tricky because the location where the configuration is saved is always known - so let's start with this simple solution showing a proper error message when trying to save.

please include the text from the HTTP 403 response in the message to the user - it contains the path which was not accessible for writing.

David Ding
March 22, 2017, 4:30 AM
Stefan Seifert
March 22, 2017, 4:43 AM

thanks!

Done

Assignee

Unassigned

Reporter

Stefan Seifert

Labels

None

Components

Affects versions

Priority

Major