Refactor User.Id to User.ID

This commit is contained in:
Unknwon 2016-07-24 01:08:22 +08:00
parent 46e96c008c
commit 1f2e173a74
79 changed files with 333 additions and 328 deletions

View file

@ -72,13 +72,13 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
ctx.Org.IsTeamMember = true
ctx.Org.IsTeamAdmin = true
} else if ctx.IsSigned {
ctx.Org.IsOwner = org.IsOwnedBy(ctx.User.Id)
ctx.Org.IsOwner = org.IsOwnedBy(ctx.User.ID)
if ctx.Org.IsOwner {
ctx.Org.IsMember = true
ctx.Org.IsTeamMember = true
ctx.Org.IsTeamAdmin = true
} else {
if org.IsOrgMember(ctx.User.Id) {
if org.IsOrgMember(ctx.User.ID) {
ctx.Org.IsMember = true
}
}
@ -105,7 +105,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
return
}
} else {
if err := org.GetUserTeams(ctx.User.Id); err != nil {
if err := org.GetUserTeams(ctx.User.ID); err != nil {
ctx.Handle(500, "GetUserTeams", err)
return
}