summaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-07-28 05:59:39 +0200
committerGitHub <noreply@github.com>2022-07-28 11:59:39 +0800
commit86e5268c396bd89716b2617a4949837982c1b0c3 (patch)
treea01a04c069644694470c3159ce3daed94436ef08 /routers/web/org
parent4604048010347ea946ae57628d694a631787ab17 (diff)
downloadgitea-86e5268c396bd89716b2617a4949837982c1b0c3.tar.gz
gitea-86e5268c396bd89716b2617a4949837982c1b0c3.zip
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>
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/setting.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go
index c22a124e74..3f7bc59856 100644
--- a/routers/web/org/setting.go
+++ b/routers/web/org/setting.go
@@ -24,6 +24,7 @@ import (
user_setting "code.gitea.io/gitea/routers/web/user/setting"
"code.gitea.io/gitea/services/forms"
"code.gitea.io/gitea/services/org"
+ container_service "code.gitea.io/gitea/services/packages/container"
repo_service "code.gitea.io/gitea/services/repository"
user_service "code.gitea.io/gitea/services/user"
)
@@ -88,6 +89,12 @@ func SettingsPost(ctx *context.Context) {
}
return
}
+
+ if err := container_service.UpdateRepositoryNames(ctx, org.AsUser(), form.Name); err != nil {
+ ctx.ServerError("UpdateRepositoryNames", err)
+ return
+ }
+
// reset ctx.org.OrgLink with new name
ctx.Org.OrgLink = setting.AppSubURL + "/org/" + url.PathEscape(form.Name)
log.Trace("Organization name changed: %s -> %s", org.Name, form.Name)