Fixing some locations to use the IsTeamAdmin function which properly checks for system admin permissions.

Этот коммит содержится в:
Christopher Speller
2015-09-30 11:30:11 -04:00
родитель 89b77cc72f
Коммит 7d31f3a271
7 изменённых файлов: 15 добавлений и 11 удалений

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

@@ -507,7 +507,7 @@ func getPublicLink(c *Context, w http.ResponseWriter, r *http.Request) {
}
func getExport(c *Context, w http.ResponseWriter, r *http.Request) {
if !c.HasPermissionsToTeam(c.Session.TeamId, "export") || !c.IsTeamAdmin(c.Session.UserId) {
if !c.HasPermissionsToTeam(c.Session.TeamId, "export") || !c.IsTeamAdmin() {
c.Err = model.NewAppError("getExport", "Only a team admin can retrieve exported data.", "userId="+c.Session.UserId)
c.Err.StatusCode = http.StatusForbidden
return