Hey all,
I noticed that, despite having Topic Write access, I am not allowed to edit topic’s title.
This seem to only work when API key has a global scope.
With API key that has the following permission scopes:
I am getting:
curl 'https://__NAME__.discourse.team/t/-/19.json' \
-H "Api-Key: 3990a1..." \
-H "Api-Username: system" \
-H "Content-Type: application/json" \
-X PUT \
-d "{ \"title\": \"Title - test curl v5\" }"
{"errors":["You are not permitted to view the requested resource. The API username or key is invalid."],"error_type":"invalid_access"}
And I get the same response when I select all granular scopes.
Only when creating an API key with Scope: Global, I manage to edit topic’s title:
curl 'https://__NAME__.discourse.team/t/-/19.json' \
-H "Api-Key: 0adc49d..." \
-H "Api-Username: system" \
-H "Content-Type: application/json" \
-X PUT \
-d "{ \"title\": \"Title - test curl v5\" }"
{"basic_topic":{"id":19,"title":"Title - test curl v5","fancy_title":"Title - test curl v5","slug":"title-test-curl-v5","posts_count":2}}
I would expect from topic write access to support edit operation. It seems to me like enforcing global scope for that is not desired.