{"action":"created","comment":{"url":"https://api.github.com/repos/mobydq/mobydq/pulls/comments/225445461","pull_request_review_id":165042668,"id":225445461,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTQ0NTQ2MQ==","diff_hunk":"@@ -8,14 +8,51 @@ import DataSource from './../DataSource/DataSource';\n import NotFoundComponent from '../Error/NotFoundComponent'\n import Login from '../Login/Login';\n \n+const PrivateRoute = ({ component: Component, ...rest }) => (\n+    <Route {...rest} render={(props) => (\n+        isAuthentificated(rest)\n+            ? <Component {...props} />\n+            : <Redirect to={{\n+            pathname: '/login',\n+            state: { from: props.location }\n+        }} />\n+    )} />\n+);\n+\n+function isAuthentificated(props){\n+    let cookieValue = getCookieValue('token');\n+    if(cookieValue !== null && cookieValue.length > 5){\n+        let token = parseJwt(cookieValue);\n+\n+        for(let a = 0; a < props.permissions.length; a++) {\n+            if(!token.role.includes(props.permissions[a])) {\n+                return false;\n+            }\n+        }\n+        return true;\n+    }\n+    return false;\n+}\n+\n+function parseJwt (token) {\n+    let base64Url = token.split('.')[1];\n+    let base64 = base64Url.replace('-', '+').replace('_', '/');","path":"app/src/Components/Base/Content.js","position":null,"original_position":39,"commit_id":"3a76ee94da6a9f481bc4fffc7f893690885a7d01","original_commit_id":"3d91354bbfb2764e7a478dfa2bec49cda1c2a940","user":{"login":"ThomasGassmann","id":16067344,"node_id":"MDQ6VXNlcjE2MDY3MzQ0","avatar_url":"https://avatars0.githubusercontent.com/u/16067344?v=4","gravatar_id":"","url":"https://api.github.com/users/ThomasGassmann","html_url":"https://github.com/ThomasGassmann","followers_url":"https://api.github.com/users/ThomasGassmann/followers","following_url":"https://api.github.com/users/ThomasGassmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasGassmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasGassmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasGassmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasGassmann/orgs","repos_url":"https://api.github.com/users/ThomasGassmann/repos","events_url":"https://api.github.com/users/ThomasGassmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasGassmann/received_events","type":"User","site_admin":false},"body":"Delayed the decision on that for now.","created_at":"2018-10-16T08:35:51Z","updated_at":"2018-10-16T08:35:51Z","html_url":"https://github.com/mobydq/mobydq/pull/200#discussion_r225445461","pull_request_url":"https://api.github.com/repos/mobydq/mobydq/pulls/200","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/comments/225445461"},"html":{"href":"https://github.com/mobydq/mobydq/pull/200#discussion_r225445461"},"pull_request":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/200"}},"in_reply_to_id":225427563},"pull_request":{"url":"https://api.github.com/repos/mobydq/mobydq/pulls/200","id":223140730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMTQwNzMw","html_url":"https://github.com/mobydq/mobydq/pull/200","diff_url":"https://github.com/mobydq/mobydq/pull/200.diff","patch_url":"https://github.com/mobydq/mobydq/pull/200.patch","issue_url":"https://api.github.com/repos/mobydq/mobydq/issues/200","number":200,"state":"open","locked":false,"title":"Client permission check.","user":{"login":"Epsuchti","id":19792843,"node_id":"MDQ6VXNlcjE5NzkyODQz","avatar_url":"https://avatars0.githubusercontent.com/u/19792843?v=4","gravatar_id":"","url":"https://api.github.com/users/Epsuchti","html_url":"https://github.com/Epsuchti","followers_url":"https://api.github.com/users/Epsuchti/followers","following_url":"https://api.github.com/users/Epsuchti/following{/other_user}","gists_url":"https://api.github.com/users/Epsuchti/gists{/gist_id}","starred_url":"https://api.github.com/users/Epsuchti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Epsuchti/subscriptions","organizations_url":"https://api.github.com/users/Epsuchti/orgs","repos_url":"https://api.github.com/users/Epsuchti/repos","events_url":"https://api.github.com/users/Epsuchti/events{/privacy}","received_events_url":"https://api.github.com/users/Epsuchti/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-16T07:23:51Z","updated_at":"2018-10-16T08:35:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4914f0332bb3b9680de080314db8f98971608dc3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mobydq/mobydq/pulls/200/commits","review_comments_url":"https://api.github.com/repos/mobydq/mobydq/pulls/200/comments","review_comment_url":"https://api.github.com/repos/mobydq/mobydq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mobydq/mobydq/issues/200/comments","statuses_url":"https://api.github.com/repos/mobydq/mobydq/statuses/3a76ee94da6a9f481bc4fffc7f893690885a7d01","head":{"label":"Epsuchti:#114","ref":"#114","sha":"3a76ee94da6a9f481bc4fffc7f893690885a7d01","user":{"login":"Epsuchti","id":19792843,"node_id":"MDQ6VXNlcjE5NzkyODQz","avatar_url":"https://avatars0.githubusercontent.com/u/19792843?v=4","gravatar_id":"","url":"https://api.github.com/users/Epsuchti","html_url":"https://github.com/Epsuchti","followers_url":"https://api.github.com/users/Epsuchti/followers","following_url":"https://api.github.com/users/Epsuchti/following{/other_user}","gists_url":"https://api.github.com/users/Epsuchti/gists{/gist_id}","starred_url":"https://api.github.com/users/Epsuchti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Epsuchti/subscriptions","organizations_url":"https://api.github.com/users/Epsuchti/orgs","repos_url":"https://api.github.com/users/Epsuchti/repos","events_url":"https://api.github.com/users/Epsuchti/events{/privacy}","received_events_url":"https://api.github.com/users/Epsuchti/received_events","type":"User","site_admin":false},"repo":{"id":153042696,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMwNDI2OTY=","name":"mobydq","full_name":"Epsuchti/mobydq","private":false,"owner":{"login":"Epsuchti","id":19792843,"node_id":"MDQ6VXNlcjE5NzkyODQz","avatar_url":"https://avatars0.githubusercontent.com/u/19792843?v=4","gravatar_id":"","url":"https://api.github.com/users/Epsuchti","html_url":"https://github.com/Epsuchti","followers_url":"https://api.github.com/users/Epsuchti/followers","following_url":"https://api.github.com/users/Epsuchti/following{/other_user}","gists_url":"https://api.github.com/users/Epsuchti/gists{/gist_id}","starred_url":"https://api.github.com/users/Epsuchti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Epsuchti/subscriptions","organizations_url":"https://api.github.com/users/Epsuchti/orgs","repos_url":"https://api.github.com/users/Epsuchti/repos","events_url":"https://api.github.com/users/Epsuchti/events{/privacy}","received_events_url":"https://api.github.com/users/Epsuchti/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Epsuchti/mobydq","description":":whale: Tool to automate data quality checks on data pipelines","fork":true,"url":"https://api.github.com/repos/Epsuchti/mobydq","forks_url":"https://api.github.com/repos/Epsuchti/mobydq/forks","keys_url":"https://api.github.com/repos/Epsuchti/mobydq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Epsuchti/mobydq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Epsuchti/mobydq/teams","hooks_url":"https://api.github.com/repos/Epsuchti/mobydq/hooks","issue_events_url":"https://api.github.com/repos/Epsuchti/mobydq/issues/events{/number}","events_url":"https://api.github.com/repos/Epsuchti/mobydq/events","assignees_url":"https://api.github.com/repos/Epsuchti/mobydq/assignees{/user}","branches_url":"https://api.github.com/repos/Epsuchti/mobydq/branches{/branch}","tags_url":"https://api.github.com/repos/Epsuchti/mobydq/tags","blobs_url":"https://api.github.com/repos/Epsuchti/mobydq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Epsuchti/mobydq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Epsuchti/mobydq/git/refs{/sha}","trees_url":"https://api.github.com/repos/Epsuchti/mobydq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Epsuchti/mobydq/statuses/{sha}","languages_url":"https://api.github.com/repos/Epsuchti/mobydq/languages","stargazers_url":"https://api.github.com/repos/Epsuchti/mobydq/stargazers","contributors_url":"https://api.github.com/repos/Epsuchti/mobydq/contributors","subscribers_url":"https://api.github.com/repos/Epsuchti/mobydq/subscribers","subscription_url":"https://api.github.com/repos/Epsuchti/mobydq/subscription","commits_url":"https://api.github.com/repos/Epsuchti/mobydq/commits{/sha}","git_commits_url":"https://api.github.com/repos/Epsuchti/mobydq/git/commits{/sha}","comments_url":"https://api.github.com/repos/Epsuchti/mobydq/comments{/number}","issue_comment_url":"https://api.github.com/repos/Epsuchti/mobydq/issues/comments{/number}","contents_url":"https://api.github.com/repos/Epsuchti/mobydq/contents/{+path}","compare_url":"https://api.github.com/repos/Epsuchti/mobydq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Epsuchti/mobydq/merges","archive_url":"https://api.github.com/repos/Epsuchti/mobydq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Epsuchti/mobydq/downloads","issues_url":"https://api.github.com/repos/Epsuchti/mobydq/issues{/number}","pulls_url":"https://api.github.com/repos/Epsuchti/mobydq/pulls{/number}","milestones_url":"https://api.github.com/repos/Epsuchti/mobydq/milestones{/number}","notifications_url":"https://api.github.com/repos/Epsuchti/mobydq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Epsuchti/mobydq/labels{/name}","releases_url":"https://api.github.com/repos/Epsuchti/mobydq/releases{/id}","deployments_url":"https://api.github.com/repos/Epsuchti/mobydq/deployments","created_at":"2018-10-15T02:35:19Z","updated_at":"2018-10-15T02:35:22Z","pushed_at":"2018-10-16T08:33:09Z","git_url":"git://github.com/Epsuchti/mobydq.git","ssh_url":"git@github.com:Epsuchti/mobydq.git","clone_url":"https://github.com/Epsuchti/mobydq.git","svn_url":"https://github.com/Epsuchti/mobydq","homepage":"https://mobydq.github.io","size":38930,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mobydq:development","ref":"development","sha":"8bce4593afeb68f5c11802d6dc84d8d45e5ce1ba","user":{"login":"mobydq","id":43715948,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzE1OTQ4","avatar_url":"https://avatars0.githubusercontent.com/u/43715948?v=4","gravatar_id":"","url":"https://api.github.com/users/mobydq","html_url":"https://github.com/mobydq","followers_url":"https://api.github.com/users/mobydq/followers","following_url":"https://api.github.com/users/mobydq/following{/other_user}","gists_url":"https://api.github.com/users/mobydq/gists{/gist_id}","starred_url":"https://api.github.com/users/mobydq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobydq/subscriptions","organizations_url":"https://api.github.com/users/mobydq/orgs","repos_url":"https://api.github.com/users/mobydq/repos","events_url":"https://api.github.com/users/mobydq/events{/privacy}","received_events_url":"https://api.github.com/users/mobydq/received_events","type":"Organization","site_admin":false},"repo":{"id":102476818,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI0NzY4MTg=","name":"mobydq","full_name":"mobydq/mobydq","private":false,"owner":{"login":"mobydq","id":43715948,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzE1OTQ4","avatar_url":"https://avatars0.githubusercontent.com/u/43715948?v=4","gravatar_id":"","url":"https://api.github.com/users/mobydq","html_url":"https://github.com/mobydq","followers_url":"https://api.github.com/users/mobydq/followers","following_url":"https://api.github.com/users/mobydq/following{/other_user}","gists_url":"https://api.github.com/users/mobydq/gists{/gist_id}","starred_url":"https://api.github.com/users/mobydq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobydq/subscriptions","organizations_url":"https://api.github.com/users/mobydq/orgs","repos_url":"https://api.github.com/users/mobydq/repos","events_url":"https://api.github.com/users/mobydq/events{/privacy}","received_events_url":"https://api.github.com/users/mobydq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mobydq/mobydq","description":":whale: Tool to automate data quality checks on data pipelines","fork":false,"url":"https://api.github.com/repos/mobydq/mobydq","forks_url":"https://api.github.com/repos/mobydq/mobydq/forks","keys_url":"https://api.github.com/repos/mobydq/mobydq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobydq/mobydq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobydq/mobydq/teams","hooks_url":"https://api.github.com/repos/mobydq/mobydq/hooks","issue_events_url":"https://api.github.com/repos/mobydq/mobydq/issues/events{/number}","events_url":"https://api.github.com/repos/mobydq/mobydq/events","assignees_url":"https://api.github.com/repos/mobydq/mobydq/assignees{/user}","branches_url":"https://api.github.com/repos/mobydq/mobydq/branches{/branch}","tags_url":"https://api.github.com/repos/mobydq/mobydq/tags","blobs_url":"https://api.github.com/repos/mobydq/mobydq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobydq/mobydq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobydq/mobydq/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobydq/mobydq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobydq/mobydq/statuses/{sha}","languages_url":"https://api.github.com/repos/mobydq/mobydq/languages","stargazers_url":"https://api.github.com/repos/mobydq/mobydq/stargazers","contributors_url":"https://api.github.com/repos/mobydq/mobydq/contributors","subscribers_url":"https://api.github.com/repos/mobydq/mobydq/subscribers","subscription_url":"https://api.github.com/repos/mobydq/mobydq/subscription","commits_url":"https://api.github.com/repos/mobydq/mobydq/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobydq/mobydq/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobydq/mobydq/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobydq/mobydq/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobydq/mobydq/contents/{+path}","compare_url":"https://api.github.com/repos/mobydq/mobydq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobydq/mobydq/merges","archive_url":"https://api.github.com/repos/mobydq/mobydq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobydq/mobydq/downloads","issues_url":"https://api.github.com/repos/mobydq/mobydq/issues{/number}","pulls_url":"https://api.github.com/repos/mobydq/mobydq/pulls{/number}","milestones_url":"https://api.github.com/repos/mobydq/mobydq/milestones{/number}","notifications_url":"https://api.github.com/repos/mobydq/mobydq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobydq/mobydq/labels{/name}","releases_url":"https://api.github.com/repos/mobydq/mobydq/releases{/id}","deployments_url":"https://api.github.com/repos/mobydq/mobydq/deployments","created_at":"2017-09-05T12:11:21Z","updated_at":"2018-10-16T06:35:52Z","pushed_at":"2018-10-16T08:33:11Z","git_url":"git://github.com/mobydq/mobydq.git","ssh_url":"git@github.com:mobydq/mobydq.git","clone_url":"https://github.com/mobydq/mobydq.git","svn_url":"https://github.com/mobydq/mobydq","homepage":"https://mobydq.github.io","size":38957,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":41,"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":12,"open_issues":41,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/200"},"html":{"href":"https://github.com/mobydq/mobydq/pull/200"},"issue":{"href":"https://api.github.com/repos/mobydq/mobydq/issues/200"},"comments":{"href":"https://api.github.com/repos/mobydq/mobydq/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mobydq/mobydq/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/mobydq/mobydq/statuses/3a76ee94da6a9f481bc4fffc7f893690885a7d01"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ThomasGassmann"}}