summaryrefslogtreecommitdiffstats
path: root/routers/org/members.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-17 21:51:39 -0400
committerUnknwon <u@gogs.io>2015-03-17 21:51:39 -0400
commit466facc0097bf636b6a945a0daebb7c4c5c33c91 (patch)
tree614c2782ff5b59dd40cea9a9caadb93d46570258 /routers/org/members.go
parent33894591a6d391674e938d018801d88d0011f0b7 (diff)
downloadgitea-466facc0097bf636b6a945a0daebb7c4c5c33c91.tar.gz
gitea-466facc0097bf636b6a945a0daebb7c4c5c33c91.zip
#1067: Deleting users should remove them from collaborator lists
- fix delete user but repository watches are not decreased
Diffstat (limited to 'routers/org/members.go')
-rw-r--r--routers/org/members.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/org/members.go b/routers/org/members.go
index f571e334e1..c8c90cfe48 100644
--- a/routers/org/members.go
+++ b/routers/org/members.go
@@ -61,14 +61,14 @@ func MembersAction(ctx *middleware.Context) {
return
}
err = org.RemoveMember(uid)
- if err == models.ErrLastOrgOwner {
+ if models.IsErrLastOrgOwner(err) {
ctx.Flash.Error(ctx.Tr("form.last_org_owner"))
ctx.Redirect(ctx.Org.OrgLink + "/members")
return
}
case "leave":
err = org.RemoveMember(ctx.User.Id)
- if err == models.ErrLastOrgOwner {
+ if models.IsErrLastOrgOwner(err) {
ctx.Flash.Error(ctx.Tr("form.last_org_owner"))
ctx.Redirect(ctx.Org.OrgLink + "/members")
return