summaryrefslogtreecommitdiffstats
path: root/models/migrations/v111.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v111.go')
-rw-r--r--models/migrations/v111.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/migrations/v111.go b/models/migrations/v111.go
index 66ff4843e5..6a94298ddc 100644
--- a/models/migrations/v111.go
+++ b/models/migrations/v111.go
@@ -148,7 +148,7 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error {
if user == nil {
hasOrgVisible = repoOwner.Visibility == VisibleTypePublic
} else if !user.IsAdmin {
- isUserPartOfOrg, err := sess.
+ hasMemberWithUserID, err := sess.
Where("uid=?", user.ID).
And("org_id=?", repoOwner.ID).
Table("org_user").
@@ -156,7 +156,7 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error {
if err != nil {
hasOrgVisible = false
}
- if (repoOwner.Visibility == VisibleTypePrivate || user.IsRestricted) && !isUserPartOfOrg {
+ if (repoOwner.Visibility == VisibleTypePrivate || user.IsRestricted) && !hasMemberWithUserID {
hasOrgVisible = false
}
}