[gitea] week 2025-14 cherry pick (gitea/main -> forgejo) (#7486)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7486
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Gusted 2025-04-13 12:00:15 +00:00
commit 442958df1d
10 changed files with 80 additions and 23 deletions

View file

@ -49,6 +49,9 @@ func ApplicationsPost(ctx *context.Context) {
ctx.ServerError("GetScope", err)
return
}
if !scope.HasPermissionScope() {
ctx.Flash.Error(ctx.Tr("settings.at_least_one_permission"), true)
}
t := &auth_model.AccessToken{
UID: ctx.Doer.ID,
Name: form.Name,