{"action":"created","comment":{"url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/comments/143464134","pull_request_review_id":67978254,"id":143464134,"diff_hunk":"@@ -12,28 +12,40 @@\n     public function getSaveAction()\n     {\n         $saveAction = session('save_action', config('backpack.crud.default_save_action', 'save_and_back'));\n-        $saveOptions = [];\n-        $saveCurrent = [\n-            'value' => $saveAction,\n-            'label' => $this->getSaveActionButtonName($saveAction),\n+\n+        // Generate list of actions to main action order.\n+        $saveOptions = [\n+            'save_and_back' => $this->getSaveActionButtonName('save_and_back'),\n+            'save_and_edit' => $this->getSaveActionButtonName('save_and_edit'),\n+            'save_and_new' => $this->getSaveActionButtonName('save_and_new'),\n         ];\n \n-        switch ($saveAction) {\n-            case 'save_and_edit':\n-                $saveOptions['save_and_back'] = $this->getSaveActionButtonName('save_and_back');\n-                $saveOptions['save_and_new'] = $this->getSaveActionButtonName('save_and_new');\n-                break;\n-            case 'save_and_new':\n-                $saveOptions['save_and_back'] = $this->getSaveActionButtonName('save_and_back');\n-                $saveOptions['save_and_edit'] = $this->getSaveActionButtonName('save_and_edit');\n-                break;\n-            case 'save_and_back':\n-            default:\n-                $saveOptions['save_and_edit'] = $this->getSaveActionButtonName('save_and_edit');\n-                $saveOptions['save_and_new'] = $this->getSaveActionButtonName('save_and_new');\n-                break;\n+        // Correctly remove \"Save and back\" action.\n+        if (! $this->crud->hasAccess('list')) {\n+            unset($saveOptions['save_and_back']);\n+        }\n+\n+        // Correctly remove \"Save and new\" action.","path":"src/app/Http/Controllers/CrudFeatures/SaveActions.php","position":35,"original_position":35,"commit_id":"48702a69ee30b107568a904fb6ba0a6609f41317","original_commit_id":"48702a69ee30b107568a904fb6ba0a6609f41317","user":{"login":"lloy0076","id":1174532,"avatar_url":"https://avatars3.githubusercontent.com/u/1174532?v=4","gravatar_id":"","url":"https://api.github.com/users/lloy0076","html_url":"https://github.com/lloy0076","followers_url":"https://api.github.com/users/lloy0076/followers","following_url":"https://api.github.com/users/lloy0076/following{/other_user}","gists_url":"https://api.github.com/users/lloy0076/gists{/gist_id}","starred_url":"https://api.github.com/users/lloy0076/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lloy0076/subscriptions","organizations_url":"https://api.github.com/users/lloy0076/orgs","repos_url":"https://api.github.com/users/lloy0076/repos","events_url":"https://api.github.com/users/lloy0076/events{/privacy}","received_events_url":"https://api.github.com/users/lloy0076/received_events","type":"User","site_admin":false},"body":"See above.","created_at":"2017-10-09T13:16:32Z","updated_at":"2017-10-09T13:17:56Z","html_url":"https://github.com/Laravel-Backpack/CRUD/pull/679#discussion_r143464134","pull_request_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/comments/143464134"},"html":{"href":"https://github.com/Laravel-Backpack/CRUD/pull/679#discussion_r143464134"},"pull_request":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679"}}},"pull_request":{"url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679","id":120480851,"html_url":"https://github.com/Laravel-Backpack/CRUD/pull/679","diff_url":"https://github.com/Laravel-Backpack/CRUD/pull/679.diff","patch_url":"https://github.com/Laravel-Backpack/CRUD/pull/679.patch","issue_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/679","number":679,"state":"open","locked":false,"title":"Save action access","user":{"login":"FrittenKeeZ","id":1186125,"avatar_url":"https://avatars1.githubusercontent.com/u/1186125?v=4","gravatar_id":"","url":"https://api.github.com/users/FrittenKeeZ","html_url":"https://github.com/FrittenKeeZ","followers_url":"https://api.github.com/users/FrittenKeeZ/followers","following_url":"https://api.github.com/users/FrittenKeeZ/following{/other_user}","gists_url":"https://api.github.com/users/FrittenKeeZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FrittenKeeZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrittenKeeZ/subscriptions","organizations_url":"https://api.github.com/users/FrittenKeeZ/orgs","repos_url":"https://api.github.com/users/FrittenKeeZ/repos","events_url":"https://api.github.com/users/FrittenKeeZ/events{/privacy}","received_events_url":"https://api.github.com/users/FrittenKeeZ/received_events","type":"User","site_admin":false},"body":"This fix prevents the \"Save and new item\" action from being displayed, when the user is denied create permission.","created_at":"2017-05-14T10:28:25Z","updated_at":"2017-10-09T13:17:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8c04e96a326fd996932eea2d81397ebc109e818","assignee":{"login":"tabacitu","id":1032474,"avatar_url":"https://avatars0.githubusercontent.com/u/1032474?v=4","gravatar_id":"","url":"https://api.github.com/users/tabacitu","html_url":"https://github.com/tabacitu","followers_url":"https://api.github.com/users/tabacitu/followers","following_url":"https://api.github.com/users/tabacitu/following{/other_user}","gists_url":"https://api.github.com/users/tabacitu/gists{/gist_id}","starred_url":"https://api.github.com/users/tabacitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabacitu/subscriptions","organizations_url":"https://api.github.com/users/tabacitu/orgs","repos_url":"https://api.github.com/users/tabacitu/repos","events_url":"https://api.github.com/users/tabacitu/events{/privacy}","received_events_url":"https://api.github.com/users/tabacitu/received_events","type":"User","site_admin":false},"assignees":[{"login":"tabacitu","id":1032474,"avatar_url":"https://avatars0.githubusercontent.com/u/1032474?v=4","gravatar_id":"","url":"https://api.github.com/users/tabacitu","html_url":"https://github.com/tabacitu","followers_url":"https://api.github.com/users/tabacitu/followers","following_url":"https://api.github.com/users/tabacitu/following{/other_user}","gists_url":"https://api.github.com/users/tabacitu/gists{/gist_id}","starred_url":"https://api.github.com/users/tabacitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabacitu/subscriptions","organizations_url":"https://api.github.com/users/tabacitu/orgs","repos_url":"https://api.github.com/users/tabacitu/repos","events_url":"https://api.github.com/users/tabacitu/events{/privacy}","received_events_url":"https://api.github.com/users/tabacitu/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"tabacitu","id":1032474,"avatar_url":"https://avatars0.githubusercontent.com/u/1032474?v=4","gravatar_id":"","url":"https://api.github.com/users/tabacitu","html_url":"https://github.com/tabacitu","followers_url":"https://api.github.com/users/tabacitu/followers","following_url":"https://api.github.com/users/tabacitu/following{/other_user}","gists_url":"https://api.github.com/users/tabacitu/gists{/gist_id}","starred_url":"https://api.github.com/users/tabacitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabacitu/subscriptions","organizations_url":"https://api.github.com/users/tabacitu/orgs","repos_url":"https://api.github.com/users/tabacitu/repos","events_url":"https://api.github.com/users/tabacitu/events{/privacy}","received_events_url":"https://api.github.com/users/tabacitu/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679/commits","review_comments_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679/comments","review_comment_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/679/comments","statuses_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/statuses/48702a69ee30b107568a904fb6ba0a6609f41317","head":{"label":"FrittenKeeZ:save-action-access","ref":"save-action-access","sha":"48702a69ee30b107568a904fb6ba0a6609f41317","user":{"login":"FrittenKeeZ","id":1186125,"avatar_url":"https://avatars1.githubusercontent.com/u/1186125?v=4","gravatar_id":"","url":"https://api.github.com/users/FrittenKeeZ","html_url":"https://github.com/FrittenKeeZ","followers_url":"https://api.github.com/users/FrittenKeeZ/followers","following_url":"https://api.github.com/users/FrittenKeeZ/following{/other_user}","gists_url":"https://api.github.com/users/FrittenKeeZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FrittenKeeZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrittenKeeZ/subscriptions","organizations_url":"https://api.github.com/users/FrittenKeeZ/orgs","repos_url":"https://api.github.com/users/FrittenKeeZ/repos","events_url":"https://api.github.com/users/FrittenKeeZ/events{/privacy}","received_events_url":"https://api.github.com/users/FrittenKeeZ/received_events","type":"User","site_admin":false},"repo":{"id":91235553,"name":"CRUD","full_name":"FrittenKeeZ/CRUD","owner":{"login":"FrittenKeeZ","id":1186125,"avatar_url":"https://avatars1.githubusercontent.com/u/1186125?v=4","gravatar_id":"","url":"https://api.github.com/users/FrittenKeeZ","html_url":"https://github.com/FrittenKeeZ","followers_url":"https://api.github.com/users/FrittenKeeZ/followers","following_url":"https://api.github.com/users/FrittenKeeZ/following{/other_user}","gists_url":"https://api.github.com/users/FrittenKeeZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FrittenKeeZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrittenKeeZ/subscriptions","organizations_url":"https://api.github.com/users/FrittenKeeZ/orgs","repos_url":"https://api.github.com/users/FrittenKeeZ/repos","events_url":"https://api.github.com/users/FrittenKeeZ/events{/privacy}","received_events_url":"https://api.github.com/users/FrittenKeeZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FrittenKeeZ/CRUD","description":"Build a custom admin interface for your Eloquent models, using Laravel 5.2, 5.3 or 5.4","fork":true,"url":"https://api.github.com/repos/FrittenKeeZ/CRUD","forks_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/forks","keys_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/teams","hooks_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/hooks","issue_events_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/issues/events{/number}","events_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/events","assignees_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/assignees{/user}","branches_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/branches{/branch}","tags_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/tags","blobs_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/git/refs{/sha}","trees_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/statuses/{sha}","languages_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/languages","stargazers_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/stargazers","contributors_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/contributors","subscribers_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/subscribers","subscription_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/subscription","commits_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/commits{/sha}","git_commits_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/git/commits{/sha}","comments_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/comments{/number}","issue_comment_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/issues/comments{/number}","contents_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/contents/{+path}","compare_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/merges","archive_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/downloads","issues_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/issues{/number}","pulls_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/pulls{/number}","milestones_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/milestones{/number}","notifications_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/labels{/name}","releases_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/releases{/id}","deployments_url":"https://api.github.com/repos/FrittenKeeZ/CRUD/deployments","created_at":"2017-05-14T10:20:16Z","updated_at":"2017-05-14T10:20:19Z","pushed_at":"2017-09-28T15:28:34Z","git_url":"git://github.com/FrittenKeeZ/CRUD.git","ssh_url":"git@github.com:FrittenKeeZ/CRUD.git","clone_url":"https://github.com/FrittenKeeZ/CRUD.git","svn_url":"https://github.com/FrittenKeeZ/CRUD","homepage":"http://backpackforlaravel.com","size":6216,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Laravel-Backpack:master","ref":"master","sha":"a58929d3633023b9b01e6a5d2311a94d094c1baa","user":{"login":"Laravel-Backpack","id":15017015,"avatar_url":"https://avatars2.githubusercontent.com/u/15017015?v=4","gravatar_id":"","url":"https://api.github.com/users/Laravel-Backpack","html_url":"https://github.com/Laravel-Backpack","followers_url":"https://api.github.com/users/Laravel-Backpack/followers","following_url":"https://api.github.com/users/Laravel-Backpack/following{/other_user}","gists_url":"https://api.github.com/users/Laravel-Backpack/gists{/gist_id}","starred_url":"https://api.github.com/users/Laravel-Backpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Laravel-Backpack/subscriptions","organizations_url":"https://api.github.com/users/Laravel-Backpack/orgs","repos_url":"https://api.github.com/users/Laravel-Backpack/repos","events_url":"https://api.github.com/users/Laravel-Backpack/events{/privacy}","received_events_url":"https://api.github.com/users/Laravel-Backpack/received_events","type":"Organization","site_admin":false},"repo":{"id":53581270,"name":"CRUD","full_name":"Laravel-Backpack/CRUD","owner":{"login":"Laravel-Backpack","id":15017015,"avatar_url":"https://avatars2.githubusercontent.com/u/15017015?v=4","gravatar_id":"","url":"https://api.github.com/users/Laravel-Backpack","html_url":"https://github.com/Laravel-Backpack","followers_url":"https://api.github.com/users/Laravel-Backpack/followers","following_url":"https://api.github.com/users/Laravel-Backpack/following{/other_user}","gists_url":"https://api.github.com/users/Laravel-Backpack/gists{/gist_id}","starred_url":"https://api.github.com/users/Laravel-Backpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Laravel-Backpack/subscriptions","organizations_url":"https://api.github.com/users/Laravel-Backpack/orgs","repos_url":"https://api.github.com/users/Laravel-Backpack/repos","events_url":"https://api.github.com/users/Laravel-Backpack/events{/privacy}","received_events_url":"https://api.github.com/users/Laravel-Backpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Laravel-Backpack/CRUD","description":"Build a custom admin interface for your Eloquent models, using Laravel 5.2 to 5.5","fork":false,"url":"https://api.github.com/repos/Laravel-Backpack/CRUD","forks_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/forks","keys_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/teams","hooks_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/hooks","issue_events_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/events{/number}","events_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/events","assignees_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/assignees{/user}","branches_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/branches{/branch}","tags_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/tags","blobs_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/git/refs{/sha}","trees_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/statuses/{sha}","languages_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/languages","stargazers_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/stargazers","contributors_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/contributors","subscribers_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/subscribers","subscription_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/subscription","commits_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/commits{/sha}","git_commits_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/git/commits{/sha}","comments_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/comments{/number}","issue_comment_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/comments{/number}","contents_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/contents/{+path}","compare_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/merges","archive_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/downloads","issues_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues{/number}","pulls_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls{/number}","milestones_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/milestones{/number}","notifications_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/labels{/name}","releases_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/releases{/id}","deployments_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/deployments","created_at":"2016-03-10T12:03:46Z","updated_at":"2017-10-09T10:42:15Z","pushed_at":"2017-10-09T12:57:16Z","git_url":"git://github.com/Laravel-Backpack/CRUD.git","ssh_url":"git@github.com:Laravel-Backpack/CRUD.git","clone_url":"https://github.com/Laravel-Backpack/CRUD.git","svn_url":"https://github.com/Laravel-Backpack/CRUD","homepage":"http://backpackforlaravel.com","size":6592,"stargazers_count":739,"watchers_count":739,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":270,"mirror_url":null,"open_issues_count":140,"forks":270,"open_issues":140,"watchers":739,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679"},"html":{"href":"https://github.com/Laravel-Backpack/CRUD/pull/679"},"issue":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/679"},"comments":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/679/comments"},"review_comments":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679/comments"},"review_comment":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/pulls/679/commits"},"statuses":{"href":"https://api.github.com/repos/Laravel-Backpack/CRUD/statuses/48702a69ee30b107568a904fb6ba0a6609f41317"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lloy0076"}}