{"action":"created","comment":{"url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/comments/235696312","pull_request_review_id":177618976,"id":235696312,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTY5NjMxMg==","diff_hunk":"@@ -345,10 +372,23 @@ class ProfilePopover extends React.Component {\n             />\n         );\n \n+        const supportsChannelAdmin = this.props.isLicensed;\n+        const isChannelAdmin = supportsChannelAdmin && (Utils.isChannelAdmin(this.props.isLicensed, this.props.channelMember.roles) || this.props.channelMember.scheme_admin);\n+\n+        let roleTitle;\n+        if (Utils.isSystemAdmin(this.props.user.roles)) {\n+            roleTitle = <span className='user-popover__role'>{'System Admin'}</span>;\n+        } else if (Utils.isInRole(this.props.teamMember.roles, 'team_admin')) {\n+            roleTitle = <span className='user-popover__role'>{'Team Admin'}</span>;\n+        } else if (isChannelAdmin && !this.props.isSearch) {\n+            roleTitle = <span className='user-popover__role'>{'Channel Admin'}</span>;","path":"components/profile_popover/profile_popover.jsx","position":175,"original_position":175,"commit_id":"b0f0e533f21dd040d95da628f74ee98b17750e18","original_commit_id":"b0f0e533f21dd040d95da628f74ee98b17750e18","user":{"login":"grundleborg","id":1198059,"node_id":"MDQ6VXNlcjExOTgwNTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1198059?v=4","gravatar_id":"","url":"https://api.github.com/users/grundleborg","html_url":"https://github.com/grundleborg","followers_url":"https://api.github.com/users/grundleborg/followers","following_url":"https://api.github.com/users/grundleborg/following{/other_user}","gists_url":"https://api.github.com/users/grundleborg/gists{/gist_id}","starred_url":"https://api.github.com/users/grundleborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grundleborg/subscriptions","organizations_url":"https://api.github.com/users/grundleborg/orgs","repos_url":"https://api.github.com/users/grundleborg/repos","events_url":"https://api.github.com/users/grundleborg/events{/privacy}","received_events_url":"https://api.github.com/users/grundleborg/received_events","type":"User","site_admin":false},"body":"I think these strings should be i18n rather than hard coded in english?","created_at":"2018-11-22T11:45:19Z","updated_at":"2018-11-22T11:47:57Z","html_url":"https://github.com/mattermost/mattermost-webapp/pull/1487#discussion_r235696312","pull_request_url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/comments/235696312"},"html":{"href":"https://github.com/mattermost/mattermost-webapp/pull/1487#discussion_r235696312"},"pull_request":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487"}}},"pull_request":{"url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487","id":204550327,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NTUwMzI3","html_url":"https://github.com/mattermost/mattermost-webapp/pull/1487","diff_url":"https://github.com/mattermost/mattermost-webapp/pull/1487.diff","patch_url":"https://github.com/mattermost/mattermost-webapp/pull/1487.patch","issue_url":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/1487","number":1487,"state":"open","locked":false,"title":"Added Admin Badge to Profile Popover","user":{"login":"DSchalla","id":5972329,"node_id":"MDQ6VXNlcjU5NzIzMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/5972329?v=4","gravatar_id":"","url":"https://api.github.com/users/DSchalla","html_url":"https://github.com/DSchalla","followers_url":"https://api.github.com/users/DSchalla/followers","following_url":"https://api.github.com/users/DSchalla/following{/other_user}","gists_url":"https://api.github.com/users/DSchalla/gists{/gist_id}","starred_url":"https://api.github.com/users/DSchalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSchalla/subscriptions","organizations_url":"https://api.github.com/users/DSchalla/orgs","repos_url":"https://api.github.com/users/DSchalla/repos","events_url":"https://api.github.com/users/DSchalla/events{/privacy}","received_events_url":"https://api.github.com/users/DSchalla/received_events","type":"User","site_admin":false},"body":"#### Summary\r\nThis PR adds an admin badge to the profile popover show whether an user is an channel / team / system admin using a shield icon on the right side. The title of the icon shows the admin level of the user.\r\n\r\nPreview:\r\n![Example Image](https://i.imgur.com/9NPrc3q.png)\r\n\r\n#### Ticket Link\r\nN/A\r\n\r\n#### Checklist\r\n[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]\r\n- [x] Ran `make check-style` to check for style errors (required for all pull requests)\r\n- [x] Ran `make test` to ensure unit and component tests passed\r\n- [x] Has UI changes","created_at":"2018-07-27T22:06:03Z","updated_at":"2018-11-22T11:47:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8444cc4bedde9d0b992791f7f70870fa2c01b98f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"asaadmahmood","id":11034289,"node_id":"MDQ6VXNlcjExMDM0Mjg5","avatar_url":"https://avatars1.githubusercontent.com/u/11034289?v=4","gravatar_id":"","url":"https://api.github.com/users/asaadmahmood","html_url":"https://github.com/asaadmahmood","followers_url":"https://api.github.com/users/asaadmahmood/followers","following_url":"https://api.github.com/users/asaadmahmood/following{/other_user}","gists_url":"https://api.github.com/users/asaadmahmood/gists{/gist_id}","starred_url":"https://api.github.com/users/asaadmahmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaadmahmood/subscriptions","organizations_url":"https://api.github.com/users/asaadmahmood/orgs","repos_url":"https://api.github.com/users/asaadmahmood/repos","events_url":"https://api.github.com/users/asaadmahmood/events{/privacy}","received_events_url":"https://api.github.com/users/asaadmahmood/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":685999255,"node_id":"MDU6TGFiZWw2ODU5OTkyNTU=","url":"https://api.github.com/repos/mattermost/mattermost-webapp/labels/2:%20Dev%20Review","name":"2: Dev Review","color":"eb6420","default":false}],"milestone":{"url":"https://api.github.com/repos/mattermost/mattermost-webapp/milestones/17","html_url":"https://github.com/mattermost/mattermost-webapp/milestone/17","labels_url":"https://api.github.com/repos/mattermost/mattermost-webapp/milestones/17/labels","id":3696306,"node_id":"MDk6TWlsZXN0b25lMzY5NjMwNg==","number":17,"title":"v5.6.0","description":"","creator":{"login":"jespino","id":290303,"node_id":"MDQ6VXNlcjI5MDMwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/290303?v=4","gravatar_id":"","url":"https://api.github.com/users/jespino","html_url":"https://github.com/jespino","followers_url":"https://api.github.com/users/jespino/followers","following_url":"https://api.github.com/users/jespino/following{/other_user}","gists_url":"https://api.github.com/users/jespino/gists{/gist_id}","starred_url":"https://api.github.com/users/jespino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jespino/subscriptions","organizations_url":"https://api.github.com/users/jespino/orgs","repos_url":"https://api.github.com/users/jespino/repos","events_url":"https://api.github.com/users/jespino/events{/privacy}","received_events_url":"https://api.github.com/users/jespino/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":88,"state":"open","created_at":"2018-09-28T10:51:29Z","updated_at":"2018-11-21T19:54:04Z","due_on":"2018-12-16T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487/commits","review_comments_url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487/comments","review_comment_url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/1487/comments","statuses_url":"https://api.github.com/repos/mattermost/mattermost-webapp/statuses/b0f0e533f21dd040d95da628f74ee98b17750e18","head":{"label":"DSchalla:adminbadge","ref":"adminbadge","sha":"b0f0e533f21dd040d95da628f74ee98b17750e18","user":{"login":"DSchalla","id":5972329,"node_id":"MDQ6VXNlcjU5NzIzMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/5972329?v=4","gravatar_id":"","url":"https://api.github.com/users/DSchalla","html_url":"https://github.com/DSchalla","followers_url":"https://api.github.com/users/DSchalla/followers","following_url":"https://api.github.com/users/DSchalla/following{/other_user}","gists_url":"https://api.github.com/users/DSchalla/gists{/gist_id}","starred_url":"https://api.github.com/users/DSchalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSchalla/subscriptions","organizations_url":"https://api.github.com/users/DSchalla/orgs","repos_url":"https://api.github.com/users/DSchalla/repos","events_url":"https://api.github.com/users/DSchalla/events{/privacy}","received_events_url":"https://api.github.com/users/DSchalla/received_events","type":"User","site_admin":false},"repo":{"id":128113434,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgxMTM0MzQ=","name":"mattermost-webapp","full_name":"DSchalla/mattermost-webapp","private":false,"owner":{"login":"DSchalla","id":5972329,"node_id":"MDQ6VXNlcjU5NzIzMjk=","avatar_url":"https://avatars0.githubusercontent.com/u/5972329?v=4","gravatar_id":"","url":"https://api.github.com/users/DSchalla","html_url":"https://github.com/DSchalla","followers_url":"https://api.github.com/users/DSchalla/followers","following_url":"https://api.github.com/users/DSchalla/following{/other_user}","gists_url":"https://api.github.com/users/DSchalla/gists{/gist_id}","starred_url":"https://api.github.com/users/DSchalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DSchalla/subscriptions","organizations_url":"https://api.github.com/users/DSchalla/orgs","repos_url":"https://api.github.com/users/DSchalla/repos","events_url":"https://api.github.com/users/DSchalla/events{/privacy}","received_events_url":"https://api.github.com/users/DSchalla/received_events","type":"User","site_admin":false},"html_url":"https://github.com/DSchalla/mattermost-webapp","description":"Webapp of Mattermost server: https://github.com/mattermost/mattermost-server","fork":true,"url":"https://api.github.com/repos/DSchalla/mattermost-webapp","forks_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/forks","keys_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/teams","hooks_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/hooks","issue_events_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/events","assignees_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/tags","blobs_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/languages","stargazers_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/stargazers","contributors_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/contributors","subscribers_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/subscribers","subscription_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/subscription","commits_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/merges","archive_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/downloads","issues_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/labels{/name}","releases_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/DSchalla/mattermost-webapp/deployments","created_at":"2018-04-04T19:48:32Z","updated_at":"2018-04-04T19:48:38Z","pushed_at":"2018-11-19T21:11:54Z","git_url":"git://github.com/DSchalla/mattermost-webapp.git","ssh_url":"git@github.com:DSchalla/mattermost-webapp.git","clone_url":"https://github.com/DSchalla/mattermost-webapp.git","svn_url":"https://github.com/DSchalla/mattermost-webapp","homepage":null,"size":110336,"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,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mattermost:master","ref":"master","sha":"559396dc33c823023c7c09a6c21efc4923c3b1b4","user":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","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":102689445,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI2ODk0NDU=","name":"mattermost-webapp","full_name":"mattermost/mattermost-webapp","private":false,"owner":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","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},"html_url":"https://github.com/mattermost/mattermost-webapp","description":"Webapp of Mattermost server: https://github.com/mattermost/mattermost-server","fork":false,"url":"https://api.github.com/repos/mattermost/mattermost-webapp","forks_url":"https://api.github.com/repos/mattermost/mattermost-webapp/forks","keys_url":"https://api.github.com/repos/mattermost/mattermost-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattermost/mattermost-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattermost/mattermost-webapp/teams","hooks_url":"https://api.github.com/repos/mattermost/mattermost-webapp/hooks","issue_events_url":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/mattermost/mattermost-webapp/events","assignees_url":"https://api.github.com/repos/mattermost/mattermost-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/mattermost/mattermost-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/mattermost/mattermost-webapp/tags","blobs_url":"https://api.github.com/repos/mattermost/mattermost-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattermost/mattermost-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattermost/mattermost-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattermost/mattermost-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattermost/mattermost-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/mattermost/mattermost-webapp/languages","stargazers_url":"https://api.github.com/repos/mattermost/mattermost-webapp/stargazers","contributors_url":"https://api.github.com/repos/mattermost/mattermost-webapp/contributors","subscribers_url":"https://api.github.com/repos/mattermost/mattermost-webapp/subscribers","subscription_url":"https://api.github.com/repos/mattermost/mattermost-webapp/subscription","commits_url":"https://api.github.com/repos/mattermost/mattermost-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattermost/mattermost-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattermost/mattermost-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattermost/mattermost-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/mattermost/mattermost-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattermost/mattermost-webapp/merges","archive_url":"https://api.github.com/repos/mattermost/mattermost-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattermost/mattermost-webapp/downloads","issues_url":"https://api.github.com/repos/mattermost/mattermost-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/mattermost/mattermost-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/mattermost/mattermost-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattermost/mattermost-webapp/labels{/name}","releases_url":"https://api.github.com/repos/mattermost/mattermost-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/mattermost/mattermost-webapp/deployments","created_at":"2017-09-07T04:00:02Z","updated_at":"2018-11-21T19:54:11Z","pushed_at":"2018-11-22T11:36:05Z","git_url":"git://github.com/mattermost/mattermost-webapp.git","ssh_url":"git@github.com:mattermost/mattermost-webapp.git","clone_url":"https://github.com/mattermost/mattermost-webapp.git","svn_url":"https://github.com/mattermost/mattermost-webapp","homepage":null,"size":111509,"stargazers_count":288,"watchers_count":288,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":592,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":592,"open_issues":34,"watchers":288,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487"},"html":{"href":"https://github.com/mattermost/mattermost-webapp/pull/1487"},"issue":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/1487"},"comments":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/issues/1487/comments"},"review_comments":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487/comments"},"review_comment":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/pulls/1487/commits"},"statuses":{"href":"https://api.github.com/repos/mattermost/mattermost-webapp/statuses/b0f0e533f21dd040d95da628f74ee98b17750e18"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"grundleborg"}}