{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/vault/pulls/comments/56390515","id":56390515,"diff_hunk":"@@ -0,0 +1,76 @@\n+package userpass\n+\n+import (\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\t\"github.com/hashicorp/vault/logical\"\n+\t\"github.com/hashicorp/vault/logical/framework\"\n+)\n+\n+func pathUserPolicies(b *backend) *framework.Path {\n+\treturn &framework.Path{\n+\t\tPattern: \"users/\" + framework.GenericNameRegex(\"username\") + \"/policies$\",\n+\t\tFields: map[string]*framework.FieldSchema{\n+\t\t\t\"username\": &framework.FieldSchema{\n+\t\t\t\tType:        framework.TypeString,\n+\t\t\t\tDescription: \"Username for this user.\",\n+\t\t\t},\n+\t\t\t\"policies\": &framework.FieldSchema{\n+\t\t\t\tType:        framework.TypeString,\n+\t\t\t\tDescription: \"Comma-separated list of policies\",\n+\t\t\t},\n+\t\t},\n+\n+\t\tExistenceCheck: b.userPoliciesExistenceCheck,\n+\n+\t\tCallbacks: map[logical.Operation]framework.OperationFunc{\n+\t\t\tlogical.UpdateOperation: b.pathUserPoliciesUpdate,\n+\t\t},\n+\n+\t\tHelpSynopsis:    pathUserPoliciesHelpSyn,\n+\t\tHelpDescription: pathUserPoliciesHelpDesc,\n+\t}\n+}\n+\n+func (b *backend) userPoliciesExistenceCheck(req *logical.Request, data *framework.FieldData) (bool, error) {","path":"builtin/credential/userpass/path_user_policies.go","position":36,"original_position":36,"commit_id":"daab5d6777416ec443cd1ab2562e08859c1c53cd","original_commit_id":"daab5d6777416ec443cd1ab2562e08859c1c53cd","user":{"login":"jefferai","id":28627,"avatar_url":"https://avatars.githubusercontent.com/u/28627?v=3","gravatar_id":"","url":"https://api.github.com/users/jefferai","html_url":"https://github.com/jefferai","followers_url":"https://api.github.com/users/jefferai/followers","following_url":"https://api.github.com/users/jefferai/following{/other_user}","gists_url":"https://api.github.com/users/jefferai/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferai/subscriptions","organizations_url":"https://api.github.com/users/jefferai/orgs","repos_url":"https://api.github.com/users/jefferai/repos","events_url":"https://api.github.com/users/jefferai/events{/privacy}","received_events_url":"https://api.github.com/users/jefferai/received_events","type":"User","site_admin":false},"body":"Copypasta comment here too!","created_at":"2016-03-16T18:34:58Z","updated_at":"2016-03-16T18:34:58Z","html_url":"https://github.com/hashicorp/vault/pull/1216#discussion_r56390515","pull_request_url":"https://api.github.com/repos/hashicorp/vault/pulls/1216","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/comments/56390515"},"html":{"href":"https://github.com/hashicorp/vault/pull/1216#discussion_r56390515"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/1216"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/vault/pulls/1216","id":62969439,"html_url":"https://github.com/hashicorp/vault/pull/1216","diff_url":"https://github.com/hashicorp/vault/pull/1216.diff","patch_url":"https://github.com/hashicorp/vault/pull/1216.patch","issue_url":"https://api.github.com/repos/hashicorp/vault/issues/1216","number":1216,"state":"open","locked":false,"title":"Userpass: Update the password and policies associated to user","user":{"login":"vishalnayak","id":3053672,"avatar_url":"https://avatars.githubusercontent.com/u/3053672?v=3","gravatar_id":"","url":"https://api.github.com/users/vishalnayak","html_url":"https://github.com/vishalnayak","followers_url":"https://api.github.com/users/vishalnayak/followers","following_url":"https://api.github.com/users/vishalnayak/following{/other_user}","gists_url":"https://api.github.com/users/vishalnayak/gists{/gist_id}","starred_url":"https://api.github.com/users/vishalnayak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishalnayak/subscriptions","organizations_url":"https://api.github.com/users/vishalnayak/orgs","repos_url":"https://api.github.com/users/vishalnayak/repos","events_url":"https://api.github.com/users/vishalnayak/events{/privacy}","received_events_url":"https://api.github.com/users/vishalnayak/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-15T20:14:02Z","updated_at":"2016-03-16T18:34:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cae62e8202e8eb688c6b810f610fb1076561db68","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/vault/pulls/1216/commits","review_comments_url":"https://api.github.com/repos/hashicorp/vault/pulls/1216/comments","review_comment_url":"https://api.github.com/repos/hashicorp/vault/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/vault/issues/1216/comments","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/daab5d6777416ec443cd1ab2562e08859c1c53cd","head":{"label":"hashicorp:userpass-update","ref":"userpass-update","sha":"daab5d6777416ec443cd1ab2562e08859c1c53cd","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":31288958,"name":"vault","full_name":"hashicorp/vault","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/vault","description":"A tool for managing secrets.","fork":false,"url":"https://api.github.com/repos/hashicorp/vault","forks_url":"https://api.github.com/repos/hashicorp/vault/forks","keys_url":"https://api.github.com/repos/hashicorp/vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/vault/events","assignees_url":"https://api.github.com/repos/hashicorp/vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/vault/merges","archive_url":"https://api.github.com/repos/hashicorp/vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/vault/deployments","created_at":"2015-02-25T00:15:59Z","updated_at":"2016-03-16T17:48:24Z","pushed_at":"2016-03-16T18:27:43Z","git_url":"git://github.com/hashicorp/vault.git","ssh_url":"git@github.com:hashicorp/vault.git","clone_url":"https://github.com/hashicorp/vault.git","svn_url":"https://github.com/hashicorp/vault","homepage":"http://vaultproject.io","size":13303,"stargazers_count":4244,"watchers_count":4244,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":364,"mirror_url":null,"open_issues_count":143,"forks":364,"open_issues":143,"watchers":4244,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"bceaeb01979bc0d172eff080e5987cc512f7422d","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":31288958,"name":"vault","full_name":"hashicorp/vault","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/vault","description":"A tool for managing secrets.","fork":false,"url":"https://api.github.com/repos/hashicorp/vault","forks_url":"https://api.github.com/repos/hashicorp/vault/forks","keys_url":"https://api.github.com/repos/hashicorp/vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/vault/events","assignees_url":"https://api.github.com/repos/hashicorp/vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/vault/merges","archive_url":"https://api.github.com/repos/hashicorp/vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/vault/deployments","created_at":"2015-02-25T00:15:59Z","updated_at":"2016-03-16T17:48:24Z","pushed_at":"2016-03-16T18:27:43Z","git_url":"git://github.com/hashicorp/vault.git","ssh_url":"git@github.com:hashicorp/vault.git","clone_url":"https://github.com/hashicorp/vault.git","svn_url":"https://github.com/hashicorp/vault","homepage":"http://vaultproject.io","size":13303,"stargazers_count":4244,"watchers_count":4244,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":364,"mirror_url":null,"open_issues_count":143,"forks":364,"open_issues":143,"watchers":4244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/1216"},"html":{"href":"https://github.com/hashicorp/vault/pull/1216"},"issue":{"href":"https://api.github.com/repos/hashicorp/vault/issues/1216"},"comments":{"href":"https://api.github.com/repos/hashicorp/vault/issues/1216/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/1216/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/1216/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/vault/statuses/daab5d6777416ec443cd1ab2562e08859c1c53cd"}}}}