Fix: Add token scope 'all'

This commit is contained in:
Tobias Balle-Petersen 2023-10-24 14:20:33 +02:00
parent 956cdb7e13
commit 1e7e286a8f
2 changed files with 3 additions and 5 deletions

View File

@ -7,11 +7,8 @@ provider "gitea" {
// The token owner is the creator of the token
resource "gitea_token" "test_token" {
name = "test_token"
scopes = [
"read:issue",
"read:notification"
]
name = "test_token"
scopes = ["all"]
}
output "token" {

View File

@ -18,6 +18,7 @@ const (
// validScopes contains the valid scopes for tokens as listed
// at https://docs.gitea.com/development/oauth2-provider#scopes
var validScopes = map[string]bool{
"all": true,
"read:activitypub": true,
"write:activitypub": true,
"read:admin": true,