{"action":"created","comment":{"url":"https://api.github.com/repos/mattermost/platform/pulls/comments/136209444","pull_request_review_id":59716477,"id":136209444,"diff_hunk":"@@ -82,6 +105,21 @@ func CreatePost(post *model.Post, channel *model.Channel, triggerWebhooks bool)\n \t\tpchan = Srv.Store.Post().Get(post.RootId)\n \t}\n \n+\tuchan := Srv.Store.User().Get(post.UserId)","path":"app/post.go","position":34,"original_position":34,"commit_id":"e2f924a62eaf24ffc6c19c3d903a8a76958ea181","original_commit_id":"e2f924a62eaf24ffc6c19c3d903a8a76958ea181","user":{"login":"dmeza","id":160621,"avatar_url":"https://avatars2.githubusercontent.com/u/160621?v=4","gravatar_id":"","url":"https://api.github.com/users/dmeza","html_url":"https://github.com/dmeza","followers_url":"https://api.github.com/users/dmeza/followers","following_url":"https://api.github.com/users/dmeza/following{/other_user}","gists_url":"https://api.github.com/users/dmeza/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeza/subscriptions","organizations_url":"https://api.github.com/users/dmeza/orgs","repos_url":"https://api.github.com/users/dmeza/repos","events_url":"https://api.github.com/users/dmeza/events{/privacy}","received_events_url":"https://api.github.com/users/dmeza/received_events","type":"User","site_admin":false},"body":"@hmhealey here is the other place.","created_at":"2017-08-30T22:50:43Z","updated_at":"2017-08-30T22:54:02Z","html_url":"https://github.com/mattermost/platform/pull/7140#discussion_r136209444","pull_request_url":"https://api.github.com/repos/mattermost/platform/pulls/7140","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mattermost/platform/pulls/comments/136209444"},"html":{"href":"https://github.com/mattermost/platform/pull/7140#discussion_r136209444"},"pull_request":{"href":"https://api.github.com/repos/mattermost/platform/pulls/7140"}}},"pull_request":{"url":"https://api.github.com/repos/mattermost/platform/pulls/7140","id":134489071,"html_url":"https://github.com/mattermost/platform/pull/7140","diff_url":"https://github.com/mattermost/platform/pull/7140.diff","patch_url":"https://github.com/mattermost/platform/pull/7140.patch","issue_url":"https://api.github.com/repos/mattermost/platform/issues/7140","number":7140,"state":"open","locked":false,"title":"Config to make town square read only","user":{"login":"dmeza","id":160621,"avatar_url":"https://avatars2.githubusercontent.com/u/160621?v=4","gravatar_id":"","url":"https://api.github.com/users/dmeza","html_url":"https://github.com/dmeza","followers_url":"https://api.github.com/users/dmeza/followers","following_url":"https://api.github.com/users/dmeza/following{/other_user}","gists_url":"https://api.github.com/users/dmeza/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeza/subscriptions","organizations_url":"https://api.github.com/users/dmeza/orgs","repos_url":"https://api.github.com/users/dmeza/repos","events_url":"https://api.github.com/users/dmeza/events{/privacy}","received_events_url":"https://api.github.com/users/dmeza/received_events","type":"User","site_admin":false},"body":"#### Summary\r\nAdded a config value to make TownSquare read only for regular users. That means that when TownSquareIsReadOnly=true only admins will be able to post in Town Square. If a basic user posts to town square an error will be displayed: \"Town Square is a read-only channel.\". This applies to webhooks, also.\r\n\r\nNOTE: a change to `mattermost-redux` was needed to automatically remove the post after \"Town Square is a read-only channel.\" error. PR: https://github.com/mattermost/mattermost-redux/pull/222\r\n\r\n<img width=\"878\" alt=\"screen shot 2017-08-07 at 12 33 05 pm\" src=\"https://user-images.githubusercontent.com/160621/29038283-ce94498c-7b6c-11e7-8fd3-d4d91edde653.png\">\r\n\r\n#### Checklist\r\n- [x] Added or updated unit tests (required for all new features)\r\n- [ ] Added API documentation (required for all new APIs)\r\n- [ ] All new/modified APIs include changes to the drivers\r\n- [ ] Has enterprise changes (please link)\r\n- [ ] Has UI changes\r\n- [x] Includes text changes and localization file updates ([.../i18n/en.json](https://github.com/mattermost/platform/blob/master/i18n/en.json) and [.../webapp/i18n/en.json](https://github.com/mattermost/platform/tree/master/webapp/i18n/en.json))\r\n- [ ] Touches critical sections of the codebase (auth, upgrade, etc.)\r\n","created_at":"2017-08-07T17:35:56Z","updated_at":"2017-08-30T22:54:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76a16145614c6c276ca1ea519abb35a927d0feaf","assignee":{"login":"hmhealey","id":3277310,"avatar_url":"https://avatars3.githubusercontent.com/u/3277310?v=4","gravatar_id":"","url":"https://api.github.com/users/hmhealey","html_url":"https://github.com/hmhealey","followers_url":"https://api.github.com/users/hmhealey/followers","following_url":"https://api.github.com/users/hmhealey/following{/other_user}","gists_url":"https://api.github.com/users/hmhealey/gists{/gist_id}","starred_url":"https://api.github.com/users/hmhealey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmhealey/subscriptions","organizations_url":"https://api.github.com/users/hmhealey/orgs","repos_url":"https://api.github.com/users/hmhealey/repos","events_url":"https://api.github.com/users/hmhealey/events{/privacy}","received_events_url":"https://api.github.com/users/hmhealey/received_events","type":"User","site_admin":false},"assignees":[{"login":"hmhealey","id":3277310,"avatar_url":"https://avatars3.githubusercontent.com/u/3277310?v=4","gravatar_id":"","url":"https://api.github.com/users/hmhealey","html_url":"https://github.com/hmhealey","followers_url":"https://api.github.com/users/hmhealey/followers","following_url":"https://api.github.com/users/hmhealey/following{/other_user}","gists_url":"https://api.github.com/users/hmhealey/gists{/gist_id}","starred_url":"https://api.github.com/users/hmhealey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmhealey/subscriptions","organizations_url":"https://api.github.com/users/hmhealey/orgs","repos_url":"https://api.github.com/users/hmhealey/repos","events_url":"https://api.github.com/users/hmhealey/events{/privacy}","received_events_url":"https://api.github.com/users/hmhealey/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jwilander","id":2672098,"avatar_url":"https://avatars0.githubusercontent.com/u/2672098?v=4","gravatar_id":"","url":"https://api.github.com/users/jwilander","html_url":"https://github.com/jwilander","followers_url":"https://api.github.com/users/jwilander/followers","following_url":"https://api.github.com/users/jwilander/following{/other_user}","gists_url":"https://api.github.com/users/jwilander/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilander/subscriptions","organizations_url":"https://api.github.com/users/jwilander/orgs","repos_url":"https://api.github.com/users/jwilander/repos","events_url":"https://api.github.com/users/jwilander/events{/privacy}","received_events_url":"https://api.github.com/users/jwilander/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mattermost/platform/milestones/26","html_url":"https://github.com/mattermost/platform/milestone/26","labels_url":"https://api.github.com/repos/mattermost/platform/milestones/26/labels","id":2673668,"number":26,"title":"v4.2.0","description":"","creator":{"login":"jwilander","id":2672098,"avatar_url":"https://avatars0.githubusercontent.com/u/2672098?v=4","gravatar_id":"","url":"https://api.github.com/users/jwilander","html_url":"https://github.com/jwilander","followers_url":"https://api.github.com/users/jwilander/followers","following_url":"https://api.github.com/users/jwilander/following{/other_user}","gists_url":"https://api.github.com/users/jwilander/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilander/subscriptions","organizations_url":"https://api.github.com/users/jwilander/orgs","repos_url":"https://api.github.com/users/jwilander/repos","events_url":"https://api.github.com/users/jwilander/events{/privacy}","received_events_url":"https://api.github.com/users/jwilander/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":34,"state":"open","created_at":"2017-08-01T12:26:39Z","updated_at":"2017-08-30T22:15:33Z","due_on":"2017-09-16T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mattermost/platform/pulls/7140/commits","review_comments_url":"https://api.github.com/repos/mattermost/platform/pulls/7140/comments","review_comment_url":"https://api.github.com/repos/mattermost/platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattermost/platform/issues/7140/comments","statuses_url":"https://api.github.com/repos/mattermost/platform/statuses/e2f924a62eaf24ffc6c19c3d903a8a76958ea181","head":{"label":"dmeza:ConfigToMakeTownSquareReadOnly","ref":"ConfigToMakeTownSquareReadOnly","sha":"e2f924a62eaf24ffc6c19c3d903a8a76958ea181","user":{"login":"dmeza","id":160621,"avatar_url":"https://avatars2.githubusercontent.com/u/160621?v=4","gravatar_id":"","url":"https://api.github.com/users/dmeza","html_url":"https://github.com/dmeza","followers_url":"https://api.github.com/users/dmeza/followers","following_url":"https://api.github.com/users/dmeza/following{/other_user}","gists_url":"https://api.github.com/users/dmeza/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeza/subscriptions","organizations_url":"https://api.github.com/users/dmeza/orgs","repos_url":"https://api.github.com/users/dmeza/repos","events_url":"https://api.github.com/users/dmeza/events{/privacy}","received_events_url":"https://api.github.com/users/dmeza/received_events","type":"User","site_admin":false},"repo":{"id":85856034,"name":"platform","full_name":"dmeza/platform","owner":{"login":"dmeza","id":160621,"avatar_url":"https://avatars2.githubusercontent.com/u/160621?v=4","gravatar_id":"","url":"https://api.github.com/users/dmeza","html_url":"https://github.com/dmeza","followers_url":"https://api.github.com/users/dmeza/followers","following_url":"https://api.github.com/users/dmeza/following{/other_user}","gists_url":"https://api.github.com/users/dmeza/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeza/subscriptions","organizations_url":"https://api.github.com/users/dmeza/orgs","repos_url":"https://api.github.com/users/dmeza/repos","events_url":"https://api.github.com/users/dmeza/events{/privacy}","received_events_url":"https://api.github.com/users/dmeza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmeza/platform","description":"Open source Slack-alternative in Golang and React - Mattermost","fork":true,"url":"https://api.github.com/repos/dmeza/platform","forks_url":"https://api.github.com/repos/dmeza/platform/forks","keys_url":"https://api.github.com/repos/dmeza/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmeza/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmeza/platform/teams","hooks_url":"https://api.github.com/repos/dmeza/platform/hooks","issue_events_url":"https://api.github.com/repos/dmeza/platform/issues/events{/number}","events_url":"https://api.github.com/repos/dmeza/platform/events","assignees_url":"https://api.github.com/repos/dmeza/platform/assignees{/user}","branches_url":"https://api.github.com/repos/dmeza/platform/branches{/branch}","tags_url":"https://api.github.com/repos/dmeza/platform/tags","blobs_url":"https://api.github.com/repos/dmeza/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmeza/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmeza/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmeza/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmeza/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/dmeza/platform/languages","stargazers_url":"https://api.github.com/repos/dmeza/platform/stargazers","contributors_url":"https://api.github.com/repos/dmeza/platform/contributors","subscribers_url":"https://api.github.com/repos/dmeza/platform/subscribers","subscription_url":"https://api.github.com/repos/dmeza/platform/subscription","commits_url":"https://api.github.com/repos/dmeza/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmeza/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmeza/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmeza/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmeza/platform/contents/{+path}","compare_url":"https://api.github.com/repos/dmeza/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmeza/platform/merges","archive_url":"https://api.github.com/repos/dmeza/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmeza/platform/downloads","issues_url":"https://api.github.com/repos/dmeza/platform/issues{/number}","pulls_url":"https://api.github.com/repos/dmeza/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/dmeza/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/dmeza/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmeza/platform/labels{/name}","releases_url":"https://api.github.com/repos/dmeza/platform/releases{/id}","deployments_url":"https://api.github.com/repos/dmeza/platform/deployments","created_at":"2017-03-22T17:18:29Z","updated_at":"2017-03-22T17:18:35Z","pushed_at":"2017-08-30T22:46:23Z","git_url":"git://github.com/dmeza/platform.git","ssh_url":"git@github.com:dmeza/platform.git","clone_url":"https://github.com/dmeza/platform.git","svn_url":"https://github.com/dmeza/platform","homepage":"https://mattermost.com","size":119133,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mattermost:master","ref":"master","sha":"f34cd567a6332fe53dae27e6b99b4382505de7a1","user":{"login":"mattermost","id":9828093,"avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"repo":{"id":37448451,"name":"platform","full_name":"mattermost/platform","owner":{"login":"mattermost","id":9828093,"avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mattermost/platform","description":"Open source Slack-alternative in Golang and React - Mattermost","fork":false,"url":"https://api.github.com/repos/mattermost/platform","forks_url":"https://api.github.com/repos/mattermost/platform/forks","keys_url":"https://api.github.com/repos/mattermost/platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattermost/platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattermost/platform/teams","hooks_url":"https://api.github.com/repos/mattermost/platform/hooks","issue_events_url":"https://api.github.com/repos/mattermost/platform/issues/events{/number}","events_url":"https://api.github.com/repos/mattermost/platform/events","assignees_url":"https://api.github.com/repos/mattermost/platform/assignees{/user}","branches_url":"https://api.github.com/repos/mattermost/platform/branches{/branch}","tags_url":"https://api.github.com/repos/mattermost/platform/tags","blobs_url":"https://api.github.com/repos/mattermost/platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattermost/platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattermost/platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattermost/platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattermost/platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mattermost/platform/languages","stargazers_url":"https://api.github.com/repos/mattermost/platform/stargazers","contributors_url":"https://api.github.com/repos/mattermost/platform/contributors","subscribers_url":"https://api.github.com/repos/mattermost/platform/subscribers","subscription_url":"https://api.github.com/repos/mattermost/platform/subscription","commits_url":"https://api.github.com/repos/mattermost/platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattermost/platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattermost/platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattermost/platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattermost/platform/contents/{+path}","compare_url":"https://api.github.com/repos/mattermost/platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattermost/platform/merges","archive_url":"https://api.github.com/repos/mattermost/platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattermost/platform/downloads","issues_url":"https://api.github.com/repos/mattermost/platform/issues{/number}","pulls_url":"https://api.github.com/repos/mattermost/platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mattermost/platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mattermost/platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattermost/platform/labels{/name}","releases_url":"https://api.github.com/repos/mattermost/platform/releases{/id}","deployments_url":"https://api.github.com/repos/mattermost/platform/deployments","created_at":"2015-06-15T06:50:02Z","updated_at":"2017-08-30T22:02:05Z","pushed_at":"2017-08-30T22:46:25Z","git_url":"git://github.com/mattermost/platform.git","ssh_url":"git@github.com:mattermost/platform.git","clone_url":"https://github.com/mattermost/platform.git","svn_url":"https://github.com/mattermost/platform","homepage":"https://mattermost.com","size":120454,"stargazers_count":10936,"watchers_count":10936,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1756,"mirror_url":null,"open_issues_count":145,"forks":1756,"open_issues":145,"watchers":10936,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattermost/platform/pulls/7140"},"html":{"href":"https://github.com/mattermost/platform/pull/7140"},"issue":{"href":"https://api.github.com/repos/mattermost/platform/issues/7140"},"comments":{"href":"https://api.github.com/repos/mattermost/platform/issues/7140/comments"},"review_comments":{"href":"https://api.github.com/repos/mattermost/platform/pulls/7140/comments"},"review_comment":{"href":"https://api.github.com/repos/mattermost/platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattermost/platform/pulls/7140/commits"},"statuses":{"href":"https://api.github.com/repos/mattermost/platform/statuses/e2f924a62eaf24ffc6c19c3d903a8a76958ea181"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dmeza"}}