diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-08-16 16:58:32 +0800 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-08-16 16:58:32 +0800 |
commit | a60edbe88c62f6f5b8c1d74fdd295a2492ef30e9 (patch) | |
tree | bef3adb8e81e5ceebf4f25fbfb609fccd086b029 /routers/org | |
parent | bba707de36d9bfbdb3001e3e89fac0c072aa14e9 (diff) | |
download | gitea-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.go | 4 |
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 { |