{"action":"created","comment":{"url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/comments/39822063","id":39822063,"diff_hunk":"@@ -5735,16 +5735,23 @@ module.exports = function(AV) {\n      * Constructs a new AVRole with the given name and ACL.\n      *\n      * @param {String} name The name of the Role to create.\n-     * @param {AV.ACL} acl The ACL for this role. Roles must have an ACL.\n+     * @param {AV.ACL} [acl] The ACL for this role. if absent, the default ACL\n+     *    `{'*': { read: true }}` will be used.\n      */\n     constructor: function(name, acl) {\n-      if (_.isString(name) && (acl instanceof AV.ACL)) {\n+      if (_.isString(name)) {\n         AV.Object.prototype.constructor.call(this, null, null);\n         this.setName(name);\n-        this.setACL(acl);\n-      } else {\n-        AV.Object.prototype.constructor.call(this, name, acl);\n       }\n+      if (acl === undefined) {","path":"dist/av-core.js","position":17,"original_position":17,"commit_id":"3f67d5fe2792b8376c0e8658a045c9bef83e4dc1","original_commit_id":"3f67d5fe2792b8376c0e8658a045c9bef83e4dc1","user":{"login":"leeyeh","id":175227,"avatar_url":"https://avatars.githubusercontent.com/u/175227?v=3","gravatar_id":"","url":"https://api.github.com/users/leeyeh","html_url":"https://github.com/leeyeh","followers_url":"https://api.github.com/users/leeyeh/followers","following_url":"https://api.github.com/users/leeyeh/following{/other_user}","gists_url":"https://api.github.com/users/leeyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyeh/subscriptions","organizations_url":"https://api.github.com/users/leeyeh/orgs","repos_url":"https://api.github.com/users/leeyeh/repos","events_url":"https://api.github.com/users/leeyeh/events{/privacy}","received_events_url":"https://api.github.com/users/leeyeh/received_events","type":"User","site_admin":false},"body":"会报 `TypeError: 'acl must be an instance of AV.ACL'`","created_at":"2015-09-18T03:48:03Z","updated_at":"2015-09-18T03:48:03Z","html_url":"https://github.com/leancloud/javascript-sdk/pull/150#discussion_r39822063","pull_request_url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/comments/39822063"},"html":{"href":"https://github.com/leancloud/javascript-sdk/pull/150#discussion_r39822063"},"pull_request":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150","id":45254783,"html_url":"https://github.com/leancloud/javascript-sdk/pull/150","diff_url":"https://github.com/leancloud/javascript-sdk/pull/150.diff","patch_url":"https://github.com/leancloud/javascript-sdk/pull/150.patch","issue_url":"https://api.github.com/repos/leancloud/javascript-sdk/issues/150","number":150,"state":"open","locked":false,"title":"[feature] Use the default acl for AV.Role if absent.","user":{"login":"leeyeh","id":175227,"avatar_url":"https://avatars.githubusercontent.com/u/175227?v=3","gravatar_id":"","url":"https://api.github.com/users/leeyeh","html_url":"https://github.com/leeyeh","followers_url":"https://api.github.com/users/leeyeh/followers","following_url":"https://api.github.com/users/leeyeh/following{/other_user}","gists_url":"https://api.github.com/users/leeyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyeh/subscriptions","organizations_url":"https://api.github.com/users/leeyeh/orgs","repos_url":"https://api.github.com/users/leeyeh/repos","events_url":"https://api.github.com/users/leeyeh/events{/privacy}","received_events_url":"https://api.github.com/users/leeyeh/received_events","type":"User","site_admin":false},"body":"close #149.","created_at":"2015-09-17T06:03:08Z","updated_at":"2015-09-18T03:48:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1593c5e8ce2faf08a04f7c5805ac60773ee9a80","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150/commits","review_comments_url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150/comments","review_comment_url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leancloud/javascript-sdk/issues/150/comments","statuses_url":"https://api.github.com/repos/leancloud/javascript-sdk/statuses/3f67d5fe2792b8376c0e8658a045c9bef83e4dc1","head":{"label":"leeyeh:fix-149","ref":"fix-149","sha":"3f67d5fe2792b8376c0e8658a045c9bef83e4dc1","user":{"login":"leeyeh","id":175227,"avatar_url":"https://avatars.githubusercontent.com/u/175227?v=3","gravatar_id":"","url":"https://api.github.com/users/leeyeh","html_url":"https://github.com/leeyeh","followers_url":"https://api.github.com/users/leeyeh/followers","following_url":"https://api.github.com/users/leeyeh/following{/other_user}","gists_url":"https://api.github.com/users/leeyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyeh/subscriptions","organizations_url":"https://api.github.com/users/leeyeh/orgs","repos_url":"https://api.github.com/users/leeyeh/repos","events_url":"https://api.github.com/users/leeyeh/events{/privacy}","received_events_url":"https://api.github.com/users/leeyeh/received_events","type":"User","site_admin":false},"repo":{"id":42576815,"name":"javascript-sdk","full_name":"leeyeh/javascript-sdk","owner":{"login":"leeyeh","id":175227,"avatar_url":"https://avatars.githubusercontent.com/u/175227?v=3","gravatar_id":"","url":"https://api.github.com/users/leeyeh","html_url":"https://github.com/leeyeh","followers_url":"https://api.github.com/users/leeyeh/followers","following_url":"https://api.github.com/users/leeyeh/following{/other_user}","gists_url":"https://api.github.com/users/leeyeh/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyeh/subscriptions","organizations_url":"https://api.github.com/users/leeyeh/orgs","repos_url":"https://api.github.com/users/leeyeh/repos","events_url":"https://api.github.com/users/leeyeh/events{/privacy}","received_events_url":"https://api.github.com/users/leeyeh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leeyeh/javascript-sdk","description":"LeanCloud JavaScript SDK","fork":true,"url":"https://api.github.com/repos/leeyeh/javascript-sdk","forks_url":"https://api.github.com/repos/leeyeh/javascript-sdk/forks","keys_url":"https://api.github.com/repos/leeyeh/javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leeyeh/javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leeyeh/javascript-sdk/teams","hooks_url":"https://api.github.com/repos/leeyeh/javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/leeyeh/javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/leeyeh/javascript-sdk/events","assignees_url":"https://api.github.com/repos/leeyeh/javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/leeyeh/javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/leeyeh/javascript-sdk/tags","blobs_url":"https://api.github.com/repos/leeyeh/javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leeyeh/javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leeyeh/javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/leeyeh/javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leeyeh/javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/leeyeh/javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/leeyeh/javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/leeyeh/javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/leeyeh/javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/leeyeh/javascript-sdk/subscription","commits_url":"https://api.github.com/repos/leeyeh/javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/leeyeh/javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/leeyeh/javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/leeyeh/javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/leeyeh/javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/leeyeh/javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leeyeh/javascript-sdk/merges","archive_url":"https://api.github.com/repos/leeyeh/javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leeyeh/javascript-sdk/downloads","issues_url":"https://api.github.com/repos/leeyeh/javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/leeyeh/javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/leeyeh/javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/leeyeh/javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leeyeh/javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/leeyeh/javascript-sdk/releases{/id}","created_at":"2015-09-16T09:09:48Z","updated_at":"2015-09-16T09:09:49Z","pushed_at":"2015-09-17T11:47:12Z","git_url":"git://github.com/leeyeh/javascript-sdk.git","ssh_url":"git@github.com:leeyeh/javascript-sdk.git","clone_url":"https://github.com/leeyeh/javascript-sdk.git","svn_url":"https://github.com/leeyeh/javascript-sdk","homepage":"http://leancloud.cn/","size":6771,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"leancloud:master","ref":"master","sha":"106aaf1a79ff8d3379d477cbeb8ee6a51f818d91","user":{"login":"leancloud","id":6660518,"avatar_url":"https://avatars.githubusercontent.com/u/6660518?v=3","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":21419780,"name":"javascript-sdk","full_name":"leancloud/javascript-sdk","owner":{"login":"leancloud","id":6660518,"avatar_url":"https://avatars.githubusercontent.com/u/6660518?v=3","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leancloud/javascript-sdk","description":"LeanCloud JavaScript SDK","fork":false,"url":"https://api.github.com/repos/leancloud/javascript-sdk","forks_url":"https://api.github.com/repos/leancloud/javascript-sdk/forks","keys_url":"https://api.github.com/repos/leancloud/javascript-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leancloud/javascript-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leancloud/javascript-sdk/teams","hooks_url":"https://api.github.com/repos/leancloud/javascript-sdk/hooks","issue_events_url":"https://api.github.com/repos/leancloud/javascript-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/leancloud/javascript-sdk/events","assignees_url":"https://api.github.com/repos/leancloud/javascript-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/leancloud/javascript-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/leancloud/javascript-sdk/tags","blobs_url":"https://api.github.com/repos/leancloud/javascript-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leancloud/javascript-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leancloud/javascript-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/leancloud/javascript-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leancloud/javascript-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/leancloud/javascript-sdk/languages","stargazers_url":"https://api.github.com/repos/leancloud/javascript-sdk/stargazers","contributors_url":"https://api.github.com/repos/leancloud/javascript-sdk/contributors","subscribers_url":"https://api.github.com/repos/leancloud/javascript-sdk/subscribers","subscription_url":"https://api.github.com/repos/leancloud/javascript-sdk/subscription","commits_url":"https://api.github.com/repos/leancloud/javascript-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/leancloud/javascript-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/leancloud/javascript-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/leancloud/javascript-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/leancloud/javascript-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/leancloud/javascript-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leancloud/javascript-sdk/merges","archive_url":"https://api.github.com/repos/leancloud/javascript-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leancloud/javascript-sdk/downloads","issues_url":"https://api.github.com/repos/leancloud/javascript-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/leancloud/javascript-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/leancloud/javascript-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/leancloud/javascript-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leancloud/javascript-sdk/labels{/name}","releases_url":"https://api.github.com/repos/leancloud/javascript-sdk/releases{/id}","created_at":"2014-07-02T10:06:21Z","updated_at":"2015-09-17T17:05:31Z","pushed_at":"2015-09-18T03:13:38Z","git_url":"git://github.com/leancloud/javascript-sdk.git","ssh_url":"git@github.com:leancloud/javascript-sdk.git","clone_url":"https://github.com/leancloud/javascript-sdk.git","svn_url":"https://github.com/leancloud/javascript-sdk","homepage":"http://leancloud.cn/","size":6771,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":31,"forks":26,"open_issues":31,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150"},"html":{"href":"https://github.com/leancloud/javascript-sdk/pull/150"},"issue":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/issues/150"},"comments":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/leancloud/javascript-sdk/statuses/3f67d5fe2792b8376c0e8658a045c9bef83e4dc1"}}}}