From 3c5280119357e3742811fd724601d0bef01bcb29 Mon Sep 17 00:00:00 2001 From: David Meza Date: Fri, 1 Sep 2017 08:53:55 -0500 Subject: Config to make town square read only (#7140) * Be able to make Town Square read-only (Disable typing messages for non admins). * Do not emit UserTypingEvent when TownSquareIsReadOnly and is Town Square. * Add unit tests for TownSquareIsReadOnly config value and logic. * Add TownSquareIsReadOnly to System console>Policy. Added Telemetry. * Add control for TownSquareIsReadOnly=true only for License Enterprise Edition E10 & E20. * Update en.json * Update en.json * Update policy_settings.jsx * Change config value from TownSquareIsReadOnly to ExperimentalTownSquareIsReadOnly. * Refactored to simplify. Avoid code repeat and multiple db calls. --- api/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index fe3448ebd..9f09540e6 100644 --- a/api/context.go +++ b/api/context.go @@ -282,7 +282,7 @@ func (c *Context) LogError(err *model.AppError) { // filter out endless reconnects if c.Path == "/api/v3/users/websocket" && err.StatusCode == 401 || err.Id == "web.check_browser_compatibility.app_error" { c.LogDebug(err) - } else { + } else if err.Id != "api.post.create_post.town_square_read_only" { l4g.Error(utils.TDefault("api.context.log.error"), c.Path, err.Where, err.StatusCode, c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.TDefault), err.DetailedError) } -- cgit v1.2.3-1-g7c22