summaryrefslogtreecommitdiffstats
path: root/routers/org
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-16 16:58:32 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-16 16:58:32 +0800
commita60edbe88c62f6f5b8c1d74fdd295a2492ef30e9 (patch)
treebef3adb8e81e5ceebf4f25fbfb609fccd086b029 /routers/org
parentbba707de36d9bfbdb3001e3e89fac0c072aa14e9 (diff)
downloadgitea-a60edbe88c62f6f5b8c1d74fdd295a2492ef30e9.tar.gz
gitea-a60edbe88c62f6f5b8c1d74fdd295a2492ef30e9.zip
Add/remove member need add/remove access to repositories as well
Diffstat (limited to 'routers/org')
-rw-r--r--routers/org/teams.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index bc12a97160..d082576cc8 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -41,9 +41,9 @@ func TeamsAction(ctx *middleware.Context) {
var err error
switch ctx.Params(":action") {
case "join":
- err = models.AddTeamMember(ctx.Org.Organization.Id, ctx.Org.Team.Id, ctx.User.Id)
+ err = ctx.Org.Team.AddMember(ctx.User.Id)
case "leave":
- err = models.RemoveMember(ctx.Org.Organization.Id, ctx.Org.Team.Id, ctx.User.Id)
+ err = ctx.Org.Team.RemoveMember(ctx.User.Id)
}
if err != nil {