summaryrefslogtreecommitdiffstats
path: root/api/team.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-08-18 11:53:18 -0400
committerChristopher Speller <crspeller@gmail.com>2015-08-19 08:53:52 -0400
commit9222e191aab9397b6a7c6713d1b0b0b96b421de7 (patch)
treebdc90c7467bcab3f0755312ff0cfdb6ecddc20ff /api/team.go
parenta7e935af9c7e6254ca45e0286b05b5eb6d8283a6 (diff)
downloadchat-9222e191aab9397b6a7c6713d1b0b0b96b421de7.tar.gz
chat-9222e191aab9397b6a7c6713d1b0b0b96b421de7.tar.bz2
chat-9222e191aab9397b6a7c6713d1b0b0b96b421de7.zip
Requiring team admin to import and fixing a few style issues
Diffstat (limited to 'api/team.go')
-rw-r--r--api/team.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/api/team.go b/api/team.go
index 12d087aea..a331e9e34 100644
--- a/api/team.go
+++ b/api/team.go
@@ -494,8 +494,7 @@ func getMyTeam(c *Context, w http.ResponseWriter, r *http.Request) {
}
func importTeam(c *Context, w http.ResponseWriter, r *http.Request) {
-
- if !c.HasPermissionsToTeam(c.Session.TeamId, "import") {
+ if !c.HasPermissionsToTeam(c.Session.TeamId, "import") || !c.IsTeamAdmin(c.Session.UserId) {
c.Err = model.NewAppError("importTeam", "Only a team admin can import data.", "userId="+c.Session.UserId)
c.Err.StatusCode = http.StatusForbidden
return