1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add new CLI flags to set name and scopes when creating a user with access token (#34080)

Resolves #33474.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Kemal Zebari
2025-04-02 07:00:54 -07:00
committed by GitHub
parent 6ed1b26c58
commit 55a69ae4c6
5 changed files with 106 additions and 17 deletions

View File

@@ -54,7 +54,7 @@ func ApplicationsPost(ctx *context.Context) {
ctx.ServerError("GetScope", err)
return
}
if scope == "" || scope == auth_model.AccessTokenScopePublicOnly {
if !scope.HasPermissionScope() {
ctx.Flash.Error(ctx.Tr("settings.at_least_one_permission"), true)
}