{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/comments/25941535","id":25941535,"diff_hunk":"@@ -0,0 +1,61 @@\n+/*\n+ * The MIT License\n+ *\n+ * Copyright (c) 2013-2014, CloudBees, Inc.\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+\n+package org.jenkinsci.plugins.workflow.support.steps.input;\n+\n+import hudson.model.InvisibleAction;\n+import hudson.model.User;\n+import org.kohsuke.accmod.Restricted;\n+import org.kohsuke.accmod.restrictions.DoNotUse;\n+import org.kohsuke.stapler.export.Exported;\n+import org.kohsuke.stapler.export.ExportedBean;\n+\n+import javax.annotation.Nonnull;\n+\n+/**\n+ * @author Valentina Armenise\n+ */\n+\n+@ExportedBean\n+public class ApproverAction extends InvisibleAction {\n+\n+    public ApproverAction(String userId) {\n+        this.userId = userId;\n+    }\n+\n+    @Nonnull\n+    final private String userId;\n+\n+    @Restricted(DoNotUse.class)","path":"support/src/main/java/org/jenkinsci/plugins/workflow/support/steps/input/ApproverAction.java","position":50,"original_position":50,"commit_id":"90c04c6217864bc02c1972e50e9d2231af1791bf","original_commit_id":"90c04c6217864bc02c1972e50e9d2231af1791bf","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"body":"Still need to be `@Exported`, or there is no point in having the class as a whole be an `@ExportedBean`.","created_at":"2015-03-06T12:28:42Z","updated_at":"2015-03-06T12:28:42Z","html_url":"https://github.com/jenkinsci/workflow-plugin/pull/47#discussion_r25941535","pull_request_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/comments/25941535"},"html":{"href":"https://github.com/jenkinsci/workflow-plugin/pull/47#discussion_r25941535"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47","id":28366561,"html_url":"https://github.com/jenkinsci/workflow-plugin/pull/47","diff_url":"https://github.com/jenkinsci/workflow-plugin/pull/47.diff","patch_url":"https://github.com/jenkinsci/workflow-plugin/pull/47.patch","issue_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/47","number":47,"state":"open","locked":false,"title":"[JENKINS-26121] Approver Logged","user":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"body":"This solves https://issues.jenkins-ci.org/browse/JENKINS-26121.\r\n\r\nThe input step now records and shows who approved the request.\r\n\r\nHowever, if you are NOT logged in and try to approve, you are prompted with the error message which says \"you need to be X to submit\".\r\nif you log in, then you are asked to \"try POST\" and if you click POST an empty request(request has not parameters) is SENT causing the doSubmit to abort  the input step (even if you have approved instead).\r\n\r\n   @RequirePOST\r\n    public HttpResponse doSubmit(StaplerRequest request) throws IOException, ServletException, InterruptedException {\r\n        if (request.getParameter(\"proceed\")!=null) {\r\n            User user= User.current();\r\n            doProceed(request, user);\r\n        } else {\r\n            doAbort();\r\n        }\r\n\r\n        // go back to the Run console page\r\n        return HttpResponses.redirectTo(\"../../console\");\r\n    }\r\n\r\nThis behaviour is detected in the master as well and should be fixed.\r\n","created_at":"2015-01-30T14:57:10Z","updated_at":"2015-03-06T12:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fca1a33d6811e06d47b3cdd91ac6a127cb4f6141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/47/comments","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/statuses/90c04c6217864bc02c1972e50e9d2231af1791bf","head":{"label":"varmenise:JENKINS-26121","ref":"JENKINS-26121","sha":"90c04c6217864bc02c1972e50e9d2231af1791bf","user":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"repo":{"id":30074232,"name":"workflow-plugin","full_name":"varmenise/workflow-plugin","owner":{"login":"varmenise","id":5398781,"avatar_url":"https://avatars.githubusercontent.com/u/5398781?v=3","gravatar_id":"","url":"https://api.github.com/users/varmenise","html_url":"https://github.com/varmenise","followers_url":"https://api.github.com/users/varmenise/followers","following_url":"https://api.github.com/users/varmenise/following{/other_user}","gists_url":"https://api.github.com/users/varmenise/gists{/gist_id}","starred_url":"https://api.github.com/users/varmenise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmenise/subscriptions","organizations_url":"https://api.github.com/users/varmenise/orgs","repos_url":"https://api.github.com/users/varmenise/repos","events_url":"https://api.github.com/users/varmenise/events{/privacy}","received_events_url":"https://api.github.com/users/varmenise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/varmenise/workflow-plugin","description":"Jenkins workflow plugin","fork":true,"url":"https://api.github.com/repos/varmenise/workflow-plugin","forks_url":"https://api.github.com/repos/varmenise/workflow-plugin/forks","keys_url":"https://api.github.com/repos/varmenise/workflow-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varmenise/workflow-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varmenise/workflow-plugin/teams","hooks_url":"https://api.github.com/repos/varmenise/workflow-plugin/hooks","issue_events_url":"https://api.github.com/repos/varmenise/workflow-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/varmenise/workflow-plugin/events","assignees_url":"https://api.github.com/repos/varmenise/workflow-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/varmenise/workflow-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/varmenise/workflow-plugin/tags","blobs_url":"https://api.github.com/repos/varmenise/workflow-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varmenise/workflow-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varmenise/workflow-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/varmenise/workflow-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varmenise/workflow-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/varmenise/workflow-plugin/languages","stargazers_url":"https://api.github.com/repos/varmenise/workflow-plugin/stargazers","contributors_url":"https://api.github.com/repos/varmenise/workflow-plugin/contributors","subscribers_url":"https://api.github.com/repos/varmenise/workflow-plugin/subscribers","subscription_url":"https://api.github.com/repos/varmenise/workflow-plugin/subscription","commits_url":"https://api.github.com/repos/varmenise/workflow-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/varmenise/workflow-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/varmenise/workflow-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/varmenise/workflow-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/varmenise/workflow-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/varmenise/workflow-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varmenise/workflow-plugin/merges","archive_url":"https://api.github.com/repos/varmenise/workflow-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varmenise/workflow-plugin/downloads","issues_url":"https://api.github.com/repos/varmenise/workflow-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/varmenise/workflow-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/varmenise/workflow-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/varmenise/workflow-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varmenise/workflow-plugin/labels{/name}","releases_url":"https://api.github.com/repos/varmenise/workflow-plugin/releases{/id}","created_at":"2015-01-30T14:00:55Z","updated_at":"2015-01-30T14:00:57Z","pushed_at":"2015-03-05T12:59:03Z","git_url":"git://github.com/varmenise/workflow-plugin.git","ssh_url":"git@github.com:varmenise/workflow-plugin.git","clone_url":"https://github.com/varmenise/workflow-plugin.git","svn_url":"https://github.com/varmenise/workflow-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Workflow+Plugin","size":2922,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"jenkinsci:master","ref":"master","sha":"ab1db30982644f63837bdb5cc605abbbf57d548b","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":19630847,"name":"workflow-plugin","full_name":"jenkinsci/workflow-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/workflow-plugin","description":"Jenkins workflow plugin","fork":false,"url":"https://api.github.com/repos/jenkinsci/workflow-plugin","forks_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/workflow-plugin/releases{/id}","created_at":"2014-05-10T01:47:09Z","updated_at":"2015-03-05T16:47:52Z","pushed_at":"2015-03-05T14:52:46Z","git_url":"git://github.com/jenkinsci/workflow-plugin.git","ssh_url":"git@github.com:jenkinsci/workflow-plugin.git","clone_url":"https://github.com/jenkinsci/workflow-plugin.git","svn_url":"https://github.com/jenkinsci/workflow-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Workflow+Plugin","size":7170,"stargazers_count":254,"watchers_count":254,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":11,"forks":44,"open_issues":11,"watchers":254,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47"},"html":{"href":"https://github.com/jenkinsci/workflow-plugin/pull/47"},"issue":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/47"},"comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/workflow-plugin/statuses/90c04c6217864bc02c1972e50e9d2231af1791bf"}}}}