Merge branch 'master' into PLT-12-log

Этот коммит содержится в:
=Corey Hulen
2015-09-14 16:59:24 -07:00
родитель e06e292be7 bfebb41bc0
Коммит 3bd350dcaf
59 изменённых файлов: 18560 добавлений и 731 удалений

Просмотреть файл

@@ -106,6 +106,9 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if !h.isApi {
w.Header().Set("X-Frame-Options", "DENY")
w.Header().Set("Content-Security-Policy", "frame-ancestors none")
} else {
// All api response bodies will be JSON formatted
w.Header().Set("Content-Type", "application/json")
}
sessionId := ""
@@ -308,7 +311,7 @@ func (c *Context) IsTeamAdmin(userId string) bool {
return false
} else {
user := uresult.Data.(*model.User)
return model.IsInRole(c.Session.Roles, model.ROLE_ADMIN) && user.TeamId == c.Session.TeamId
return model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) && user.TeamId == c.Session.TeamId
}
}