diff options
Diffstat (limited to 'modules/context/org.go')
-rw-r--r-- | modules/context/org.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index 824f22b2f3..a1080fc0fb 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -77,14 +77,14 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { ctx.Data["OrgTeams"] = teams // Admin has super access. - if ctx.IsSigned && ctx.User.IsAdmin { + if ctx.IsSigned && ctx.Doer.IsAdmin { ctx.Org.IsOwner = true ctx.Org.IsMember = true ctx.Org.IsTeamMember = true ctx.Org.IsTeamAdmin = true ctx.Org.CanCreateOrgRepo = true } else if ctx.IsSigned { - ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.User.ID) + ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.Doer.ID) if err != nil { ctx.ServerError("IsOwnedBy", err) return @@ -96,12 +96,12 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { ctx.Org.IsTeamAdmin = true ctx.Org.CanCreateOrgRepo = true } else { - ctx.Org.IsMember, err = org.IsOrgMember(ctx.User.ID) + ctx.Org.IsMember, err = org.IsOrgMember(ctx.Doer.ID) if err != nil { ctx.ServerError("IsOrgMember", err) return } - ctx.Org.CanCreateOrgRepo, err = org.CanCreateOrgRepo(ctx.User.ID) + ctx.Org.CanCreateOrgRepo, err = org.CanCreateOrgRepo(ctx.Doer.ID) if err != nil { ctx.ServerError("CanCreateOrgRepo", err) return @@ -133,7 +133,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { if ctx.Org.IsOwner { shouldSeeAllTeams = true } else { - teams, err := org.GetUserTeams(ctx.User.ID) + teams, err := org.GetUserTeams(ctx.Doer.ID) if err != nil { ctx.ServerError("GetUserTeams", err) return @@ -152,7 +152,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { return } } else { - ctx.Org.Teams, err = org.GetUserTeams(ctx.User.ID) + ctx.Org.Teams, err = org.GetUserTeams(ctx.Doer.ID) if err != nil { ctx.ServerError("GetUserTeams", err) return |