summaryrefslogtreecommitdiffstats
path: root/routers/repo/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r--routers/repo/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index 02331c232b..e03bf556be 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -418,7 +418,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if newOwner.Type == models.UserTypeOrganization {
- if !ctx.User.IsAdmin && newOwner.Visibility == structs.VisibleTypePrivate && !ctx.User.IsUserPartOfOrg(newOwner.ID) {
+ if !ctx.User.IsAdmin && newOwner.Visibility == structs.VisibleTypePrivate && !newOwner.HasMemberWithUserID(ctx.User.ID) {
// The user shouldn't know about this organization
ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil)
return