{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/comments/191106115","pull_request_review_id":123616320,"id":191106115,"diff_hunk":"@@ -0,0 +1,13 @@\n+class Ability\n+  include CanCan::Ability\n+\n+  def initialize(user)\n+    user ||= User.new\n+    if user.admin?\n+      can :manage, :all\n+    else\n+      can :create, Order","path":"app/models/ability.rb","position":9,"original_position":9,"commit_id":"92f16f4e1a9f823189b064abee57a3d8a539ce57","original_commit_id":"92f16f4e1a9f823189b064abee57a3d8a539ce57","user":{"login":"dothidiemthao","id":21377118,"avatar_url":"https://avatars0.githubusercontent.com/u/21377118?v=4","gravatar_id":"","url":"https://api.github.com/users/dothidiemthao","html_url":"https://github.com/dothidiemthao","followers_url":"https://api.github.com/users/dothidiemthao/followers","following_url":"https://api.github.com/users/dothidiemthao/following{/other_user}","gists_url":"https://api.github.com/users/dothidiemthao/gists{/gist_id}","starred_url":"https://api.github.com/users/dothidiemthao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothidiemthao/subscriptions","organizations_url":"https://api.github.com/users/dothidiemthao/orgs","repos_url":"https://api.github.com/users/dothidiemthao/repos","events_url":"https://api.github.com/users/dothidiemthao/events{/privacy}","received_events_url":"https://api.github.com/users/dothidiemthao/received_events","type":"User","site_admin":false},"body":"sao chỉ có mỗi Order thế này, những model khác không phân quyền à em?","created_at":"2018-05-28T03:49:29Z","updated_at":"2018-05-28T03:49:30Z","html_url":"https://github.com/framgia/ecommerce_45/pull/17#discussion_r191106115","pull_request_url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/comments/191106115"},"html":{"href":"https://github.com/framgia/ecommerce_45/pull/17#discussion_r191106115"},"pull_request":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17","id":190498650,"html_url":"https://github.com/framgia/ecommerce_45/pull/17","diff_url":"https://github.com/framgia/ecommerce_45/pull/17.diff","patch_url":"https://github.com/framgia/ecommerce_45/pull/17.patch","issue_url":"https://api.github.com/repos/framgia/ecommerce_45/issues/17","number":17,"state":"open","locked":false,"title":"cancan","user":{"login":"thanhminhno1","id":26532868,"avatar_url":"https://avatars3.githubusercontent.com/u/26532868?v=4","gravatar_id":"","url":"https://api.github.com/users/thanhminhno1","html_url":"https://github.com/thanhminhno1","followers_url":"https://api.github.com/users/thanhminhno1/followers","following_url":"https://api.github.com/users/thanhminhno1/following{/other_user}","gists_url":"https://api.github.com/users/thanhminhno1/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhminhno1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhminhno1/subscriptions","organizations_url":"https://api.github.com/users/thanhminhno1/orgs","repos_url":"https://api.github.com/users/thanhminhno1/repos","events_url":"https://api.github.com/users/thanhminhno1/events{/privacy}","received_events_url":"https://api.github.com/users/thanhminhno1/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-25T07:04:56Z","updated_at":"2018-05-28T03:49:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7e01ed41e9d84fe20b063242850fb763a0be8bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17/commits","review_comments_url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17/comments","review_comment_url":"https://api.github.com/repos/framgia/ecommerce_45/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/ecommerce_45/issues/17/comments","statuses_url":"https://api.github.com/repos/framgia/ecommerce_45/statuses/92f16f4e1a9f823189b064abee57a3d8a539ce57","head":{"label":"thanhminhno1:cancan","ref":"cancan","sha":"92f16f4e1a9f823189b064abee57a3d8a539ce57","user":{"login":"thanhminhno1","id":26532868,"avatar_url":"https://avatars3.githubusercontent.com/u/26532868?v=4","gravatar_id":"","url":"https://api.github.com/users/thanhminhno1","html_url":"https://github.com/thanhminhno1","followers_url":"https://api.github.com/users/thanhminhno1/followers","following_url":"https://api.github.com/users/thanhminhno1/following{/other_user}","gists_url":"https://api.github.com/users/thanhminhno1/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhminhno1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhminhno1/subscriptions","organizations_url":"https://api.github.com/users/thanhminhno1/orgs","repos_url":"https://api.github.com/users/thanhminhno1/repos","events_url":"https://api.github.com/users/thanhminhno1/events{/privacy}","received_events_url":"https://api.github.com/users/thanhminhno1/received_events","type":"User","site_admin":false},"repo":{"id":131925907,"name":"ecommerce_45","full_name":"thanhminhno1/ecommerce_45","owner":{"login":"thanhminhno1","id":26532868,"avatar_url":"https://avatars3.githubusercontent.com/u/26532868?v=4","gravatar_id":"","url":"https://api.github.com/users/thanhminhno1","html_url":"https://github.com/thanhminhno1","followers_url":"https://api.github.com/users/thanhminhno1/followers","following_url":"https://api.github.com/users/thanhminhno1/following{/other_user}","gists_url":"https://api.github.com/users/thanhminhno1/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhminhno1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhminhno1/subscriptions","organizations_url":"https://api.github.com/users/thanhminhno1/orgs","repos_url":"https://api.github.com/users/thanhminhno1/repos","events_url":"https://api.github.com/users/thanhminhno1/events{/privacy}","received_events_url":"https://api.github.com/users/thanhminhno1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thanhminhno1/ecommerce_45","description":null,"fork":true,"url":"https://api.github.com/repos/thanhminhno1/ecommerce_45","forks_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/forks","keys_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/teams","hooks_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/hooks","issue_events_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/issues/events{/number}","events_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/events","assignees_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/assignees{/user}","branches_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/branches{/branch}","tags_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/tags","blobs_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/git/refs{/sha}","trees_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/statuses/{sha}","languages_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/languages","stargazers_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/stargazers","contributors_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/contributors","subscribers_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/subscribers","subscription_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/subscription","commits_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/commits{/sha}","git_commits_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/git/commits{/sha}","comments_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/comments{/number}","issue_comment_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/issues/comments{/number}","contents_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/contents/{+path}","compare_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/merges","archive_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/downloads","issues_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/issues{/number}","pulls_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/pulls{/number}","milestones_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/milestones{/number}","notifications_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/labels{/name}","releases_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/releases{/id}","deployments_url":"https://api.github.com/repos/thanhminhno1/ecommerce_45/deployments","created_at":"2018-05-03T01:38:16Z","updated_at":"2018-05-03T01:38:18Z","pushed_at":"2018-05-25T07:04:14Z","git_url":"git://github.com/thanhminhno1/ecommerce_45.git","ssh_url":"git@github.com:thanhminhno1/ecommerce_45.git","clone_url":"https://github.com/thanhminhno1/ecommerce_45.git","svn_url":"https://github.com/thanhminhno1/ecommerce_45","homepage":null,"size":1088,"stargazers_count":0,"watchers_count":0,"language":null,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"57dacc1e95b6c25c6e0b769a5f99249daa9cb56a","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":131791969,"name":"ecommerce_45","full_name":"framgia/ecommerce_45","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/ecommerce_45","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/ecommerce_45","forks_url":"https://api.github.com/repos/framgia/ecommerce_45/forks","keys_url":"https://api.github.com/repos/framgia/ecommerce_45/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/ecommerce_45/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/ecommerce_45/teams","hooks_url":"https://api.github.com/repos/framgia/ecommerce_45/hooks","issue_events_url":"https://api.github.com/repos/framgia/ecommerce_45/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/ecommerce_45/events","assignees_url":"https://api.github.com/repos/framgia/ecommerce_45/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/ecommerce_45/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/ecommerce_45/tags","blobs_url":"https://api.github.com/repos/framgia/ecommerce_45/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/ecommerce_45/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/ecommerce_45/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/ecommerce_45/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/ecommerce_45/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/ecommerce_45/languages","stargazers_url":"https://api.github.com/repos/framgia/ecommerce_45/stargazers","contributors_url":"https://api.github.com/repos/framgia/ecommerce_45/contributors","subscribers_url":"https://api.github.com/repos/framgia/ecommerce_45/subscribers","subscription_url":"https://api.github.com/repos/framgia/ecommerce_45/subscription","commits_url":"https://api.github.com/repos/framgia/ecommerce_45/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/ecommerce_45/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/ecommerce_45/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/ecommerce_45/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/ecommerce_45/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/ecommerce_45/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/ecommerce_45/merges","archive_url":"https://api.github.com/repos/framgia/ecommerce_45/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/ecommerce_45/downloads","issues_url":"https://api.github.com/repos/framgia/ecommerce_45/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/ecommerce_45/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/ecommerce_45/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/ecommerce_45/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/ecommerce_45/labels{/name}","releases_url":"https://api.github.com/repos/framgia/ecommerce_45/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/ecommerce_45/deployments","created_at":"2018-05-02T03:14:45Z","updated_at":"2018-05-25T02:58:54Z","pushed_at":"2018-05-25T07:04:57Z","git_url":"git://github.com/framgia/ecommerce_45.git","ssh_url":"git@github.com:framgia/ecommerce_45.git","clone_url":"https://github.com/framgia/ecommerce_45.git","svn_url":"https://github.com/framgia/ecommerce_45","homepage":null,"size":1077,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17"},"html":{"href":"https://github.com/framgia/ecommerce_45/pull/17"},"issue":{"href":"https://api.github.com/repos/framgia/ecommerce_45/issues/17"},"comments":{"href":"https://api.github.com/repos/framgia/ecommerce_45/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/ecommerce_45/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/ecommerce_45/statuses/92f16f4e1a9f823189b064abee57a3d8a539ce57"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dothidiemthao"}}