summaryrefslogtreecommitdiffstats
path: root/api/team.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/team.go')
-rw-r--r--api/team.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/team.go b/api/team.go
index c7fa61df6..a2ac50116 100644
--- a/api/team.go
+++ b/api/team.go
@@ -235,7 +235,7 @@ func getTeamByName(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = err
return
} else {
- if team.Type != model.TEAM_OPEN && c.Session.GetTeamByTeamId(team.Id) == nil {
+ if (!team.AllowOpenInvite || team.Type != model.TEAM_OPEN) && c.Session.GetTeamByTeamId(team.Id) == nil {
if !app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) {
c.SetPermissionError(model.PERMISSION_MANAGE_SYSTEM)
return