mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 12:22:11 +00:00
Add Docker /v2/_catalog endpoint (#20469)
* Added properties for packages. * Fixed authenticate header format. * Added _catalog endpoint. * Check owner visibility. * Extracted condition. * Added test for _catalog. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
4604048010
commit
86e5268c39
21 changed files with 341 additions and 78 deletions
|
@ -30,6 +30,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/web/middleware"
|
||||
"code.gitea.io/gitea/services/agit"
|
||||
"code.gitea.io/gitea/services/forms"
|
||||
container_service "code.gitea.io/gitea/services/packages/container"
|
||||
user_service "code.gitea.io/gitea/services/user"
|
||||
)
|
||||
|
||||
|
@ -90,6 +91,11 @@ func HandleUsernameChange(ctx *context.Context, user *user_model.User, newName s
|
|||
return err
|
||||
}
|
||||
|
||||
if err := container_service.UpdateRepositoryNames(ctx, user, newName); err != nil {
|
||||
ctx.ServerError("UpdateRepositoryNames", err)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Trace("User name changed: %s -> %s", user.Name, newName)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue