{"action":"closed","number":802,"pull_request":{"url":"https://api.github.com/repos/iview/iview-admin/pulls/802","id":204019413,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDE5NDEz","html_url":"https://github.com/iview/iview-admin/pull/802","diff_url":"https://github.com/iview/iview-admin/pull/802.diff","patch_url":"https://github.com/iview/iview-admin/pull/802.patch","issue_url":"https://api.github.com/repos/iview/iview-admin/issues/802","number":802,"state":"closed","locked":false,"title":"update route access judge function","user":{"login":"lizouzt","id":3032482,"node_id":"MDQ6VXNlcjMwMzI0ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/3032482?v=4","gravatar_id":"","url":"https://api.github.com/users/lizouzt","html_url":"https://github.com/lizouzt","followers_url":"https://api.github.com/users/lizouzt/followers","following_url":"https://api.github.com/users/lizouzt/following{/other_user}","gists_url":"https://api.github.com/users/lizouzt/gists{/gist_id}","starred_url":"https://api.github.com/users/lizouzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizouzt/subscriptions","organizations_url":"https://api.github.com/users/lizouzt/orgs","repos_url":"https://api.github.com/users/lizouzt/repos","events_url":"https://api.github.com/users/lizouzt/events{/privacy}","received_events_url":"https://api.github.com/users/lizouzt/received_events","type":"User","site_admin":false},"body":"```\r\n/**\r\n * 权鉴\r\n * @param {*} name 即将跳转的路由name\r\n * @param {*} access 用户权限数组\r\n * @param {*} routes 路由列表\r\n * @description 用户是否可跳转到该页\r\n */\r\nexport const canTurnTo = (name, access, routes) => {\r\n  const routePermissionJudge = (list) => {\r\n    return list.some(item => {\r\n      if (item.children && item.children.length) {\r\n        return routePermissionJudge(item.children)\r\n      } else if (item.name === name) {\r\n        return hasAccess(access, item)\r\n      }\r\n    })\r\n  }\r\n\r\n  return routePermissionJudge(routes)\r\n}\r\n```","created_at":"2018-07-26T03:32:27Z","updated_at":"2018-07-31T03:16:08Z","closed_at":"2018-07-31T03:16:08Z","merged_at":"2018-07-31T03:16:08Z","merge_commit_sha":"286c1a1c7b6c242eafa414c87f3304039362a5b1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iview/iview-admin/pulls/802/commits","review_comments_url":"https://api.github.com/repos/iview/iview-admin/pulls/802/comments","review_comment_url":"https://api.github.com/repos/iview/iview-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iview/iview-admin/issues/802/comments","statuses_url":"https://api.github.com/repos/iview/iview-admin/statuses/0d2711d27b60b1b39bd4c6359bb5204855237fdc","head":{"label":"lizouzt:2.0","ref":"2.0","sha":"0d2711d27b60b1b39bd4c6359bb5204855237fdc","user":{"login":"lizouzt","id":3032482,"node_id":"MDQ6VXNlcjMwMzI0ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/3032482?v=4","gravatar_id":"","url":"https://api.github.com/users/lizouzt","html_url":"https://github.com/lizouzt","followers_url":"https://api.github.com/users/lizouzt/followers","following_url":"https://api.github.com/users/lizouzt/following{/other_user}","gists_url":"https://api.github.com/users/lizouzt/gists{/gist_id}","starred_url":"https://api.github.com/users/lizouzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizouzt/subscriptions","organizations_url":"https://api.github.com/users/lizouzt/orgs","repos_url":"https://api.github.com/users/lizouzt/repos","events_url":"https://api.github.com/users/lizouzt/events{/privacy}","received_events_url":"https://api.github.com/users/lizouzt/received_events","type":"User","site_admin":false},"repo":{"id":142383310,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzODMzMTA=","name":"iview-admin","full_name":"lizouzt/iview-admin","owner":{"login":"lizouzt","id":3032482,"node_id":"MDQ6VXNlcjMwMzI0ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/3032482?v=4","gravatar_id":"","url":"https://api.github.com/users/lizouzt","html_url":"https://github.com/lizouzt","followers_url":"https://api.github.com/users/lizouzt/followers","following_url":"https://api.github.com/users/lizouzt/following{/other_user}","gists_url":"https://api.github.com/users/lizouzt/gists{/gist_id}","starred_url":"https://api.github.com/users/lizouzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizouzt/subscriptions","organizations_url":"https://api.github.com/users/lizouzt/orgs","repos_url":"https://api.github.com/users/lizouzt/repos","events_url":"https://api.github.com/users/lizouzt/events{/privacy}","received_events_url":"https://api.github.com/users/lizouzt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lizouzt/iview-admin","description":"Vue 2.0 admin management system template based on iView","fork":true,"url":"https://api.github.com/repos/lizouzt/iview-admin","forks_url":"https://api.github.com/repos/lizouzt/iview-admin/forks","keys_url":"https://api.github.com/repos/lizouzt/iview-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizouzt/iview-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizouzt/iview-admin/teams","hooks_url":"https://api.github.com/repos/lizouzt/iview-admin/hooks","issue_events_url":"https://api.github.com/repos/lizouzt/iview-admin/issues/events{/number}","events_url":"https://api.github.com/repos/lizouzt/iview-admin/events","assignees_url":"https://api.github.com/repos/lizouzt/iview-admin/assignees{/user}","branches_url":"https://api.github.com/repos/lizouzt/iview-admin/branches{/branch}","tags_url":"https://api.github.com/repos/lizouzt/iview-admin/tags","blobs_url":"https://api.github.com/repos/lizouzt/iview-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizouzt/iview-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizouzt/iview-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizouzt/iview-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizouzt/iview-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/lizouzt/iview-admin/languages","stargazers_url":"https://api.github.com/repos/lizouzt/iview-admin/stargazers","contributors_url":"https://api.github.com/repos/lizouzt/iview-admin/contributors","subscribers_url":"https://api.github.com/repos/lizouzt/iview-admin/subscribers","subscription_url":"https://api.github.com/repos/lizouzt/iview-admin/subscription","commits_url":"https://api.github.com/repos/lizouzt/iview-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizouzt/iview-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizouzt/iview-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizouzt/iview-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizouzt/iview-admin/contents/{+path}","compare_url":"https://api.github.com/repos/lizouzt/iview-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizouzt/iview-admin/merges","archive_url":"https://api.github.com/repos/lizouzt/iview-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizouzt/iview-admin/downloads","issues_url":"https://api.github.com/repos/lizouzt/iview-admin/issues{/number}","pulls_url":"https://api.github.com/repos/lizouzt/iview-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/lizouzt/iview-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/lizouzt/iview-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizouzt/iview-admin/labels{/name}","releases_url":"https://api.github.com/repos/lizouzt/iview-admin/releases{/id}","deployments_url":"https://api.github.com/repos/lizouzt/iview-admin/deployments","created_at":"2018-07-26T03:22:55Z","updated_at":"2018-07-26T03:22:57Z","pushed_at":"2018-07-26T03:29:53Z","git_url":"git://github.com/lizouzt/iview-admin.git","ssh_url":"git@github.com:lizouzt/iview-admin.git","clone_url":"https://github.com/lizouzt/iview-admin.git","svn_url":"https://github.com/lizouzt/iview-admin","homepage":"https://iview.github.io/iview-admin","size":58940,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"iview:2.0","ref":"2.0","sha":"a70db92cfad6b85bccd993739d4a109954f61feb","user":{"login":"iview","id":20693613,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjkzNjEz","avatar_url":"https://avatars3.githubusercontent.com/u/20693613?v=4","gravatar_id":"","url":"https://api.github.com/users/iview","html_url":"https://github.com/iview","followers_url":"https://api.github.com/users/iview/followers","following_url":"https://api.github.com/users/iview/following{/other_user}","gists_url":"https://api.github.com/users/iview/gists{/gist_id}","starred_url":"https://api.github.com/users/iview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iview/subscriptions","organizations_url":"https://api.github.com/users/iview/orgs","repos_url":"https://api.github.com/users/iview/repos","events_url":"https://api.github.com/users/iview/events{/privacy}","received_events_url":"https://api.github.com/users/iview/received_events","type":"Organization","site_admin":false},"repo":{"id":103645588,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM2NDU1ODg=","name":"iview-admin","full_name":"iview/iview-admin","owner":{"login":"iview","id":20693613,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjkzNjEz","avatar_url":"https://avatars3.githubusercontent.com/u/20693613?v=4","gravatar_id":"","url":"https://api.github.com/users/iview","html_url":"https://github.com/iview","followers_url":"https://api.github.com/users/iview/followers","following_url":"https://api.github.com/users/iview/following{/other_user}","gists_url":"https://api.github.com/users/iview/gists{/gist_id}","starred_url":"https://api.github.com/users/iview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iview/subscriptions","organizations_url":"https://api.github.com/users/iview/orgs","repos_url":"https://api.github.com/users/iview/repos","events_url":"https://api.github.com/users/iview/events{/privacy}","received_events_url":"https://api.github.com/users/iview/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iview/iview-admin","description":"Vue 2.0 admin management system template based on iView","fork":false,"url":"https://api.github.com/repos/iview/iview-admin","forks_url":"https://api.github.com/repos/iview/iview-admin/forks","keys_url":"https://api.github.com/repos/iview/iview-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iview/iview-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iview/iview-admin/teams","hooks_url":"https://api.github.com/repos/iview/iview-admin/hooks","issue_events_url":"https://api.github.com/repos/iview/iview-admin/issues/events{/number}","events_url":"https://api.github.com/repos/iview/iview-admin/events","assignees_url":"https://api.github.com/repos/iview/iview-admin/assignees{/user}","branches_url":"https://api.github.com/repos/iview/iview-admin/branches{/branch}","tags_url":"https://api.github.com/repos/iview/iview-admin/tags","blobs_url":"https://api.github.com/repos/iview/iview-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iview/iview-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iview/iview-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/iview/iview-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iview/iview-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/iview/iview-admin/languages","stargazers_url":"https://api.github.com/repos/iview/iview-admin/stargazers","contributors_url":"https://api.github.com/repos/iview/iview-admin/contributors","subscribers_url":"https://api.github.com/repos/iview/iview-admin/subscribers","subscription_url":"https://api.github.com/repos/iview/iview-admin/subscription","commits_url":"https://api.github.com/repos/iview/iview-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/iview/iview-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/iview/iview-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/iview/iview-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/iview/iview-admin/contents/{+path}","compare_url":"https://api.github.com/repos/iview/iview-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iview/iview-admin/merges","archive_url":"https://api.github.com/repos/iview/iview-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iview/iview-admin/downloads","issues_url":"https://api.github.com/repos/iview/iview-admin/issues{/number}","pulls_url":"https://api.github.com/repos/iview/iview-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/iview/iview-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/iview/iview-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iview/iview-admin/labels{/name}","releases_url":"https://api.github.com/repos/iview/iview-admin/releases{/id}","deployments_url":"https://api.github.com/repos/iview/iview-admin/deployments","created_at":"2017-09-15T10:34:27Z","updated_at":"2018-07-31T03:13:55Z","pushed_at":"2018-07-31T03:16:08Z","git_url":"git://github.com/iview/iview-admin.git","ssh_url":"git@github.com:iview/iview-admin.git","clone_url":"https://github.com/iview/iview-admin.git","svn_url":"https://github.com/iview/iview-admin","homepage":"https://admin.iviewui.com/","size":58924,"stargazers_count":7814,"watchers_count":7814,"language":"Vue","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2116,"mirror_url":null,"archived":false,"open_issues_count":281,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2116,"open_issues":281,"watchers":7814,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iview/iview-admin/pulls/802"},"html":{"href":"https://github.com/iview/iview-admin/pull/802"},"issue":{"href":"https://api.github.com/repos/iview/iview-admin/issues/802"},"comments":{"href":"https://api.github.com/repos/iview/iview-admin/issues/802/comments"},"review_comments":{"href":"https://api.github.com/repos/iview/iview-admin/pulls/802/comments"},"review_comment":{"href":"https://api.github.com/repos/iview/iview-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iview/iview-admin/pulls/802/commits"},"statuses":{"href":"https://api.github.com/repos/iview/iview-admin/statuses/0d2711d27b60b1b39bd4c6359bb5204855237fdc"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lison16","id":20942571,"node_id":"MDQ6VXNlcjIwOTQyNTcx","avatar_url":"https://avatars3.githubusercontent.com/u/20942571?v=4","gravatar_id":"","url":"https://api.github.com/users/lison16","html_url":"https://github.com/lison16","followers_url":"https://api.github.com/users/lison16/followers","following_url":"https://api.github.com/users/lison16/following{/other_user}","gists_url":"https://api.github.com/users/lison16/gists{/gist_id}","starred_url":"https://api.github.com/users/lison16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lison16/subscriptions","organizations_url":"https://api.github.com/users/lison16/orgs","repos_url":"https://api.github.com/users/lison16/repos","events_url":"https://api.github.com/users/lison16/events{/privacy}","received_events_url":"https://api.github.com/users/lison16/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":8,"deletions":13,"changed_files":1}}
{"actor":{"display_login":"lison16"}}