{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/comments/44052753","id":44052753,"diff_hunk":"@@ -82,14 +82,113 @@ App.ArticleWrapperComponent = Em.Component.extend(\n \t\t\t}\n \t\t},\n \n-\t\tuploadFeatureEnabled: Em.computed(function(): boolean {\n-\t\t\treturn !Em.get(Mercury, 'wiki.disableAnonymousUploadForMercury');\n+\n+\t\t/**\n+\t\t * Checks if contribution component should be enabled\n+\t\t * http://clashofclans.wikia.com/        db: clashofclans\n+\t\t * http://de.clashofclans.wikia.com/     db: declashofclans\n+\t\t * http://zh.clashofclans.wikia.com/     db: zhclashofclans723\n+\t\t * http://fr.clashofclans.wikia.com/     db: frclashofclans\n+\t\t * http://ru.clashofclans.wikia.com/     db: ruclashofclans\n+\t\t * http://es.clash-of-clans.wikia.com/   db: esclashofclans727\n+\t\t *\n+\t\t * @returns {boolean} True if contribution component is enabled for this community\n+\t\t */\n+\t\tcontributionEnabledForCommunity: Em.computed(function(): boolean {\n+\t\t\tvar dbName = Em.get(Mercury, 'wiki.dbName');\n+\n+\t\t\tvar enabledCommunities = [\n+\t\t\t\t'clashofclans', 'declashofclans', 'zhclashofclans723', 'frclashofclans',\n+\t\t\t\t'ruclashofclans', 'esclashofclans727'\n+\t\t\t];\n+\n+\t\t\tif (this.get('isJapaneseWikia')) {\n+\t\t\t\t// Enabled for all Japanese wikias\n+\t\t\t\treturn true;\n+\t\t\t} else if (Em.$.inArray(dbName, enabledCommunities) > -1) {\n+\t\t\t\t// Otherwise check against whitelist\n+\t\t\t\treturn true;\n+\t\t\t}\n+\n+\t\t\treturn false;\n \t\t}),\n \n+\t\t/**\n+\t\t * Checks if mobile contribution features are enabled.\n+\t\t * Contribution features include section editor and photo upload.\n+\t\t *\n+\t\t * @returns {boolean} True if the contribution features should be rendered on the page\n+\t\t */\n \t\tcontributionFeatureEnabled: Em.computed('model.isMainPage', function (): boolean {\n-\t\t\treturn !this.get('model.isMainPage')\n-\t\t\t\t&& this.get('isJapaneseWikia')\n-\t\t\t\t&& !Em.get(Mercury, 'wiki.disableAnonymousEditing');\n+\t\t\tvar isMainPage = this.get('model.isMainPage'),\n+\t\t\t\tisJapaneseWikia = this.get('isJapaneseWikia'),\n+\t\t\t\tenabled = this.get('contributionEnabledForCommunity');\n+\n+\t\t\treturn !this.get('model.isMainPage') &&\n+\t\t\t\tthis.get('contributionEnabledForCommunity');\n+\t\t}),\n+\n+\t\t/**\n+\t\t * Determine if the upload photo icon should be rendered.\n+\t\t * Only enabled for Japanese wikias\n+\t\t *\n+\t\t * @returns {boolean} True if the upload photo icon should be rendered\n+\t\t */\n+\t\taddPhotoIconEnabled: Em.computed(function(): boolean {\n+\t\t\tvar isMainPage = this.get('model.isMainPage'),\n+\t\t\t\tisJapaneseWikia = this.get('isJapaneseWikia');\n+\n+\t\t\t// Currently, only Japanese communities should have the photo upload icon\n+\t\t\treturn this.get('isJapaneseWikia');\n+\t\t}),\n+\n+\t\t/**\n+\t\t * Determine if the edit section icon should be rendered\n+\t\t *\n+\t\t * @returns {boolean} True if the upload photo icon should be rendered\n+\t\t */\n+\t\teditIconEnabled: Em.computed(function(): boolean {\n+\t\t\t// Currently, all communities that have the contribution feature enabled\n+\t\t\t// should have the edit icon\n+\t\t\treturn this.get('contributionFeatureEnabled');\n+\t\t}),\n+\n+\t\t/**\n+\t\t * For section editor, checks if the user is allowed to edit\n+\t\t * - Logged in users are always allowed to edit\n+\t\t * - Wikias with disableAnonymousEditing set need login to edit\n+\t\t * - Coppa wikias (for wikias directed at children) always require login to edit\n+\t\t *\n+\t\t * @returns {boolean} True if edit is allowed\n+\t\t */\n+\t\tisEditAllowed: Em.computed(function(): boolean {\n+\t\t\tvar isCoppaWiki = Em.get(Mercury, 'wiki.isCoppaWiki'),\n+\t\t\t\tdisableAnonymousEditing = Em.get(Mercury, 'wiki.disableAnonymousEditing'),\n+\t\t\t\tisLoggedIn = Em.get(Mercury, 'currentUser.isAuthenticated');\n+\n+\t\t\tif (isLoggedIn) {\n+\t\t\t\treturn true;\n+\t\t\t} else {\n+\t\t\t\treturn !(isCoppaWiki || disableAnonymousEditing);\n+\t\t\t}\n+\t\t}),\n+\n+\t\t/**\n+\t\t * For add photo, check if the user is allowed to upload\n+\t\t * - Logged in users are always allowed to add photo\n+\t\t * - Wikias with disableAnonymousUploadForMercury set need login to add photo\n+\t\t *\n+\t\t * @returns {boolean} True if add photo is allowed\n+\t\t */\n+\t\tisAddPhotoAllowed: Em.computed(function(): boolean {\n+\t\t\tvar disableAnonymousUploadForMercury = Em.get(Mercury, 'wiki.wiki.disableAnonymousUploadForMercury'),","path":"front/scripts/main/components/ArticleWrapperComponent.ts","position":108,"original_position":108,"commit_id":"db84b83d42305f0525d78348c31196cd131d7516","original_commit_id":"db84b83d42305f0525d78348c31196cd131d7516","user":{"login":"rogatty","id":7030884,"avatar_url":"https://avatars.githubusercontent.com/u/7030884?v=3","gravatar_id":"","url":"https://api.github.com/users/rogatty","html_url":"https://github.com/rogatty","followers_url":"https://api.github.com/users/rogatty/followers","following_url":"https://api.github.com/users/rogatty/following{/other_user}","gists_url":"https://api.github.com/users/rogatty/gists{/gist_id}","starred_url":"https://api.github.com/users/rogatty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogatty/subscriptions","organizations_url":"https://api.github.com/users/rogatty/orgs","repos_url":"https://api.github.com/users/rogatty/repos","events_url":"https://api.github.com/users/rogatty/events{/privacy}","received_events_url":"https://api.github.com/users/rogatty/received_events","type":"User","site_admin":false},"body":"Too much `wiki`","created_at":"2015-11-05T18:58:17Z","updated_at":"2015-11-05T18:58:17Z","html_url":"https://github.com/Wikia/mercury/pull/1605#discussion_r44052753","pull_request_url":"https://api.github.com/repos/Wikia/mercury/pulls/1605","_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments/44052753"},"html":{"href":"https://github.com/Wikia/mercury/pull/1605#discussion_r44052753"},"pull_request":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1605"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/1605","id":49784714,"html_url":"https://github.com/Wikia/mercury/pull/1605","diff_url":"https://github.com/Wikia/mercury/pull/1605.diff","patch_url":"https://github.com/Wikia/mercury/pull/1605.patch","issue_url":"https://api.github.com/repos/Wikia/mercury/issues/1605","number":1605,"state":"open","locked":false,"title":"INT-246: Mercury section editor rollout phase 1","user":{"login":"perjg","id":651004,"avatar_url":"https://avatars.githubusercontent.com/u/651004?v=3","gravatar_id":"","url":"https://api.github.com/users/perjg","html_url":"https://github.com/perjg","followers_url":"https://api.github.com/users/perjg/followers","following_url":"https://api.github.com/users/perjg/following{/other_user}","gists_url":"https://api.github.com/users/perjg/gists{/gist_id}","starred_url":"https://api.github.com/users/perjg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perjg/subscriptions","organizations_url":"https://api.github.com/users/perjg/orgs","repos_url":"https://api.github.com/users/perjg/repos","events_url":"https://api.github.com/users/perjg/events{/privacy}","received_events_url":"https://api.github.com/users/perjg/received_events","type":"User","site_admin":false},"body":"This PR contains changes for INT-89 and INT-246. Changes for INT-246 build on top of the changes for INT-89, so I am putting everything together in one PR.\r\n\r\nThese issues are for global rollout of the Mercury section editor:\r\n* INT-89: Login to edit rule implementation\r\n* INT-246: Rollout section editor for selected communities plus all Japanese communities.\r\n","created_at":"2015-11-05T05:43:56Z","updated_at":"2015-11-05T18:58:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39462b46b030ec970c50f82d96ff442d149e4242","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/mercury/pulls/1605/commits","review_comments_url":"https://api.github.com/repos/Wikia/mercury/pulls/1605/comments","review_comment_url":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/mercury/issues/1605/comments","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/db84b83d42305f0525d78348c31196cd131d7516","head":{"label":"Wikia:INT-246","ref":"INT-246","sha":"db84b83d42305f0525d78348c31196cd131d7516","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","created_at":"2014-02-10T21:44:25Z","updated_at":"2015-11-04T16:44:03Z","pushed_at":"2015-11-05T17:20:13Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":69146,"stargazers_count":12,"watchers_count":12,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":12,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"d8af8ee52a46a37a4d492d02123f1521691f67c8","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","created_at":"2014-02-10T21:44:25Z","updated_at":"2015-11-04T16:44:03Z","pushed_at":"2015-11-05T17:20:13Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":69146,"stargazers_count":12,"watchers_count":12,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":12,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1605"},"html":{"href":"https://github.com/Wikia/mercury/pull/1605"},"issue":{"href":"https://api.github.com/repos/Wikia/mercury/issues/1605"},"comments":{"href":"https://api.github.com/repos/Wikia/mercury/issues/1605/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1605/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/1605/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/mercury/statuses/db84b83d42305f0525d78348c31196cd131d7516"}}}}