{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/46694155","id":46694155,"diff_hunk":"@@ -239,27 +239,34 @@ <h3 class=\"no-match\"><div class=\"fa fa-exclamation-circle\"></div>No results</h3>\n         <li><a href=\"#plural6\"><span></span><sup></sup></a></li>\n       </ul>\n     </nav>\n-    <textarea dir=\"auto\" lang=\"{{ locale.code }}\" id=\"translation\" placeholder=\"Type translation and press Enter to save\"></textarea>\n-\n+    {% if user.is_authenticated() %}\n+      <textarea dir=\"auto\" lang=\"{{ locale.code }}\" id=\"translation\" placeholder=\"Type translation and press Enter to save\"></textarea>\n+    {% else %}\n+      <textarea readonly dir=\"auto\" lang=\"{{ locale.code }}\" id=\"translation\" placeholder=\"Type translation and press Enter to save\"></textarea>\n+    {% endif %}","path":"pontoon/base/templates/translate.html","position":10,"original_position":10,"commit_id":"4626e36a552d3128515bb9e6b577ae2896a864ad","original_commit_id":"4626e36a552d3128515bb9e6b577ae2896a864ad","user":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"body":"Is there a way to do this ? If I wrap the `readonly` in the `if` clause, for a logged in user, he/she would see 2 text areas, one which is readonly and one which is editable","created_at":"2015-12-04T15:38:07Z","updated_at":"2015-12-04T15:38:07Z","html_url":"https://github.com/mozilla/pontoon/pull/300#discussion_r46694155","pull_request_url":"https://api.github.com/repos/mozilla/pontoon/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/46694155"},"html":{"href":"https://github.com/mozilla/pontoon/pull/300#discussion_r46694155"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/300","id":52676480,"html_url":"https://github.com/mozilla/pontoon/pull/300","diff_url":"https://github.com/mozilla/pontoon/pull/300.diff","patch_url":"https://github.com/mozilla/pontoon/pull/300.patch","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/300","number":300,"state":"open","locked":false,"title":"Fix Bug 1223770: Do not allow edits/suggests to non-authenticated users","user":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"body":"Makes the translation contents purely readonly for non authenticated users.","created_at":"2015-12-04T14:41:33Z","updated_at":"2015-12-04T15:38:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7abefd496220270f9de3804e00a56059162aafb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pontoon/pulls/300/commits","review_comments_url":"https://api.github.com/repos/mozilla/pontoon/pulls/300/comments","review_comment_url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/300/comments","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/4626e36a552d3128515bb9e6b577ae2896a864ad","head":{"label":"sudheesh001:Patch_1223770","ref":"Patch_1223770","sha":"4626e36a552d3128515bb9e6b577ae2896a864ad","user":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"repo":{"id":19352912,"name":"pontoon","full_name":"sudheesh001/pontoon","owner":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sudheesh001/pontoon","description":"In-place website localization tool","fork":true,"url":"https://api.github.com/repos/sudheesh001/pontoon","forks_url":"https://api.github.com/repos/sudheesh001/pontoon/forks","keys_url":"https://api.github.com/repos/sudheesh001/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sudheesh001/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sudheesh001/pontoon/teams","hooks_url":"https://api.github.com/repos/sudheesh001/pontoon/hooks","issue_events_url":"https://api.github.com/repos/sudheesh001/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/sudheesh001/pontoon/events","assignees_url":"https://api.github.com/repos/sudheesh001/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/sudheesh001/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/sudheesh001/pontoon/tags","blobs_url":"https://api.github.com/repos/sudheesh001/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sudheesh001/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sudheesh001/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/sudheesh001/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sudheesh001/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/sudheesh001/pontoon/languages","stargazers_url":"https://api.github.com/repos/sudheesh001/pontoon/stargazers","contributors_url":"https://api.github.com/repos/sudheesh001/pontoon/contributors","subscribers_url":"https://api.github.com/repos/sudheesh001/pontoon/subscribers","subscription_url":"https://api.github.com/repos/sudheesh001/pontoon/subscription","commits_url":"https://api.github.com/repos/sudheesh001/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/sudheesh001/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/sudheesh001/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/sudheesh001/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/sudheesh001/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/sudheesh001/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sudheesh001/pontoon/merges","archive_url":"https://api.github.com/repos/sudheesh001/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sudheesh001/pontoon/downloads","issues_url":"https://api.github.com/repos/sudheesh001/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/sudheesh001/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/sudheesh001/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/sudheesh001/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sudheesh001/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/sudheesh001/pontoon/releases{/id}","created_at":"2014-05-01T18:03:59Z","updated_at":"2015-05-05T18:19:49Z","pushed_at":"2015-12-04T14:45:10Z","git_url":"git://github.com/sudheesh001/pontoon.git","ssh_url":"git@github.com:sudheesh001/pontoon.git","clone_url":"https://github.com/sudheesh001/pontoon.git","svn_url":"https://github.com/sudheesh001/pontoon","homepage":"https://pontoon.mozillalabs.com/","size":18600,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mozilla:master","ref":"master","sha":"6fa1f66061c71c281b155964f562e55e667de571","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1385890,"name":"pontoon","full_name":"mozilla/pontoon","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pontoon","description":"In-place localization tool","fork":false,"url":"https://api.github.com/repos/mozilla/pontoon","forks_url":"https://api.github.com/repos/mozilla/pontoon/forks","keys_url":"https://api.github.com/repos/mozilla/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pontoon/teams","hooks_url":"https://api.github.com/repos/mozilla/pontoon/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pontoon/events","assignees_url":"https://api.github.com/repos/mozilla/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pontoon/tags","blobs_url":"https://api.github.com/repos/mozilla/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pontoon/languages","stargazers_url":"https://api.github.com/repos/mozilla/pontoon/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pontoon/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pontoon/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pontoon/subscription","commits_url":"https://api.github.com/repos/mozilla/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pontoon/merges","archive_url":"https://api.github.com/repos/mozilla/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pontoon/downloads","issues_url":"https://api.github.com/repos/mozilla/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pontoon/releases{/id}","created_at":"2011-02-19T11:25:51Z","updated_at":"2015-12-01T02:21:02Z","pushed_at":"2015-12-04T14:41:34Z","git_url":"git://github.com/mozilla/pontoon.git","ssh_url":"git@github.com:mozilla/pontoon.git","clone_url":"https://github.com/mozilla/pontoon.git","svn_url":"https://github.com/mozilla/pontoon","homepage":"https://pontoon.mozilla.org/","size":18873,"stargazers_count":86,"watchers_count":86,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":7,"forks":33,"open_issues":7,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/300"},"html":{"href":"https://github.com/mozilla/pontoon/pull/300"},"issue":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/300"},"comments":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pontoon/statuses/4626e36a552d3128515bb9e6b577ae2896a864ad"}}}}