-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Description
Description
When creating a token via the API and supplying scopes, eg...
curl -k -H "Content-Type: application/json" -d '{"name":"test2", "scopes":["write:package", "read:notification"]}' -u user:pass https://gitea.domain.com/api/v1/users/Vlad/tokensthe response for scopes is always null, eg.
{"id":13,"name":"test2","sha1":"6xxxxxxxxxxxxxx87c","token_last_eight":"bd4e087c","scopes":null}even though the permissions are actually there:
curl -k -H "Content-Type: application/json" -u user:pass https://gitea.domain.com/api/v1/users/Vlad/tokens[{"id":13,"name":"test2","sha1":"","token_last_eight":"bd4e087c","scopes":["read:notification","write:package"]}]This issue was found when updating the documentation in pull request https://gitea.com/gitea/docs/pulls/72
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Ubuntu server, installed via binaries downloaded from this repo
Database
None