{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11","id":121629892,"html_url":"https://github.com/andela-iakande/document-manager-application/pull/11","diff_url":"https://github.com/andela-iakande/document-manager-application/pull/11.diff","patch_url":"https://github.com/andela-iakande/document-manager-application/pull/11.patch","issue_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/11","number":11,"state":"open","locked":false,"title":"144439479:Implement admin should be able to manage ","user":{"login":"andela-iakande","id":26273250,"avatar_url":"https://avatars2.githubusercontent.com/u/26273250?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iakande","html_url":"https://github.com/andela-iakande","followers_url":"https://api.github.com/users/andela-iakande/followers","following_url":"https://api.github.com/users/andela-iakande/following{/other_user}","gists_url":"https://api.github.com/users/andela-iakande/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iakande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iakande/subscriptions","organizations_url":"https://api.github.com/users/andela-iakande/orgs","repos_url":"https://api.github.com/users/andela-iakande/repos","events_url":"https://api.github.com/users/andela-iakande/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iakande/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThis PR add feature (route and controller) for an admin to be able to manage users roles and create other admins\r\n\r\n#### Description of Task to be completed?\r\ncreated end point for admin to be able to create other admin\r\nauthenticate if the route subscriber is an admin and give him access to upgrade or downgrade other admin's account\r\n\r\n#### How should this be manually tested?\r\nby\r\n\r\n1) clone the repo\r\n2) run npm start\r\n3) the app starts at local-host 5000\r\n4) visit this url on post man localhost:5000/users/login and login with your email and password(post request)\r\n5) if login is successful, open a new tab on postman and hit this end point localhost:5000/users/admin with a push request to create new admin\r\n\r\n#### Any background context you want to provide?\r\nN/A\r\n\r\n#### What are the relevant pivotal tracker stories?\r\nAdmin user should be able to manage roles\r\n\r\n#### Screenshots (if appropriate)\r\nN/A\r\n\r\n#### Questions:\r\nN/A","created_at":"2017-05-20T16:44:05Z","updated_at":"2017-05-20T16:44:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11/commits","review_comments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11/comments","review_comment_url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/11/comments","statuses_url":"https://api.github.com/repos/andela-iakande/document-manager-application/statuses/916672a87d02e4471a2c9264b2ce155442787560","head":{"label":"andela-iakande:feature/#144439479/admin-manage-roles","ref":"feature/#144439479/admin-manage-roles","sha":"916672a87d02e4471a2c9264b2ce155442787560","user":{"login":"andela-iakande","id":26273250,"avatar_url":"https://avatars2.githubusercontent.com/u/26273250?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iakande","html_url":"https://github.com/andela-iakande","followers_url":"https://api.github.com/users/andela-iakande/followers","following_url":"https://api.github.com/users/andela-iakande/following{/other_user}","gists_url":"https://api.github.com/users/andela-iakande/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iakande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iakande/subscriptions","organizations_url":"https://api.github.com/users/andela-iakande/orgs","repos_url":"https://api.github.com/users/andela-iakande/repos","events_url":"https://api.github.com/users/andela-iakande/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iakande/received_events","type":"User","site_admin":false},"repo":{"id":91850691,"name":"document-manager-application","full_name":"andela-iakande/document-manager-application","owner":{"login":"andela-iakande","id":26273250,"avatar_url":"https://avatars2.githubusercontent.com/u/26273250?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iakande","html_url":"https://github.com/andela-iakande","followers_url":"https://api.github.com/users/andela-iakande/followers","following_url":"https://api.github.com/users/andela-iakande/following{/other_user}","gists_url":"https://api.github.com/users/andela-iakande/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iakande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iakande/subscriptions","organizations_url":"https://api.github.com/users/andela-iakande/orgs","repos_url":"https://api.github.com/users/andela-iakande/repos","events_url":"https://api.github.com/users/andela-iakande/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iakande/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-iakande/document-manager-application","description":null,"fork":false,"url":"https://api.github.com/repos/andela-iakande/document-manager-application","forks_url":"https://api.github.com/repos/andela-iakande/document-manager-application/forks","keys_url":"https://api.github.com/repos/andela-iakande/document-manager-application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-iakande/document-manager-application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-iakande/document-manager-application/teams","hooks_url":"https://api.github.com/repos/andela-iakande/document-manager-application/hooks","issue_events_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/events{/number}","events_url":"https://api.github.com/repos/andela-iakande/document-manager-application/events","assignees_url":"https://api.github.com/repos/andela-iakande/document-manager-application/assignees{/user}","branches_url":"https://api.github.com/repos/andela-iakande/document-manager-application/branches{/branch}","tags_url":"https://api.github.com/repos/andela-iakande/document-manager-application/tags","blobs_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-iakande/document-manager-application/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-iakande/document-manager-application/languages","stargazers_url":"https://api.github.com/repos/andela-iakande/document-manager-application/stargazers","contributors_url":"https://api.github.com/repos/andela-iakande/document-manager-application/contributors","subscribers_url":"https://api.github.com/repos/andela-iakande/document-manager-application/subscribers","subscription_url":"https://api.github.com/repos/andela-iakande/document-manager-application/subscription","commits_url":"https://api.github.com/repos/andela-iakande/document-manager-application/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-iakande/document-manager-application/contents/{+path}","compare_url":"https://api.github.com/repos/andela-iakande/document-manager-application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-iakande/document-manager-application/merges","archive_url":"https://api.github.com/repos/andela-iakande/document-manager-application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-iakande/document-manager-application/downloads","issues_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues{/number}","pulls_url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-iakande/document-manager-application/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-iakande/document-manager-application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-iakande/document-manager-application/labels{/name}","releases_url":"https://api.github.com/repos/andela-iakande/document-manager-application/releases{/id}","deployments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/deployments","created_at":"2017-05-19T22:44:35Z","updated_at":"2017-05-20T08:45:46Z","pushed_at":"2017-05-20T16:37:32Z","git_url":"git://github.com/andela-iakande/document-manager-application.git","ssh_url":"git@github.com:andela-iakande/document-manager-application.git","clone_url":"https://github.com/andela-iakande/document-manager-application.git","svn_url":"https://github.com/andela-iakande/document-manager-application","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-iakande:development","ref":"development","sha":"6ef458af07a385243856db18d9946c5bc2c5aad5","user":{"login":"andela-iakande","id":26273250,"avatar_url":"https://avatars2.githubusercontent.com/u/26273250?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iakande","html_url":"https://github.com/andela-iakande","followers_url":"https://api.github.com/users/andela-iakande/followers","following_url":"https://api.github.com/users/andela-iakande/following{/other_user}","gists_url":"https://api.github.com/users/andela-iakande/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iakande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iakande/subscriptions","organizations_url":"https://api.github.com/users/andela-iakande/orgs","repos_url":"https://api.github.com/users/andela-iakande/repos","events_url":"https://api.github.com/users/andela-iakande/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iakande/received_events","type":"User","site_admin":false},"repo":{"id":91850691,"name":"document-manager-application","full_name":"andela-iakande/document-manager-application","owner":{"login":"andela-iakande","id":26273250,"avatar_url":"https://avatars2.githubusercontent.com/u/26273250?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-iakande","html_url":"https://github.com/andela-iakande","followers_url":"https://api.github.com/users/andela-iakande/followers","following_url":"https://api.github.com/users/andela-iakande/following{/other_user}","gists_url":"https://api.github.com/users/andela-iakande/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-iakande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-iakande/subscriptions","organizations_url":"https://api.github.com/users/andela-iakande/orgs","repos_url":"https://api.github.com/users/andela-iakande/repos","events_url":"https://api.github.com/users/andela-iakande/events{/privacy}","received_events_url":"https://api.github.com/users/andela-iakande/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-iakande/document-manager-application","description":null,"fork":false,"url":"https://api.github.com/repos/andela-iakande/document-manager-application","forks_url":"https://api.github.com/repos/andela-iakande/document-manager-application/forks","keys_url":"https://api.github.com/repos/andela-iakande/document-manager-application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-iakande/document-manager-application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-iakande/document-manager-application/teams","hooks_url":"https://api.github.com/repos/andela-iakande/document-manager-application/hooks","issue_events_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/events{/number}","events_url":"https://api.github.com/repos/andela-iakande/document-manager-application/events","assignees_url":"https://api.github.com/repos/andela-iakande/document-manager-application/assignees{/user}","branches_url":"https://api.github.com/repos/andela-iakande/document-manager-application/branches{/branch}","tags_url":"https://api.github.com/repos/andela-iakande/document-manager-application/tags","blobs_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-iakande/document-manager-application/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-iakande/document-manager-application/languages","stargazers_url":"https://api.github.com/repos/andela-iakande/document-manager-application/stargazers","contributors_url":"https://api.github.com/repos/andela-iakande/document-manager-application/contributors","subscribers_url":"https://api.github.com/repos/andela-iakande/document-manager-application/subscribers","subscription_url":"https://api.github.com/repos/andela-iakande/document-manager-application/subscription","commits_url":"https://api.github.com/repos/andela-iakande/document-manager-application/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-iakande/document-manager-application/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-iakande/document-manager-application/contents/{+path}","compare_url":"https://api.github.com/repos/andela-iakande/document-manager-application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-iakande/document-manager-application/merges","archive_url":"https://api.github.com/repos/andela-iakande/document-manager-application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-iakande/document-manager-application/downloads","issues_url":"https://api.github.com/repos/andela-iakande/document-manager-application/issues{/number}","pulls_url":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-iakande/document-manager-application/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-iakande/document-manager-application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-iakande/document-manager-application/labels{/name}","releases_url":"https://api.github.com/repos/andela-iakande/document-manager-application/releases{/id}","deployments_url":"https://api.github.com/repos/andela-iakande/document-manager-application/deployments","created_at":"2017-05-19T22:44:35Z","updated_at":"2017-05-20T08:45:46Z","pushed_at":"2017-05-20T16:37:32Z","git_url":"git://github.com/andela-iakande/document-manager-application.git","ssh_url":"git@github.com:andela-iakande/document-manager-application.git","clone_url":"https://github.com/andela-iakande/document-manager-application.git","svn_url":"https://github.com/andela-iakande/document-manager-application","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11"},"html":{"href":"https://github.com/andela-iakande/document-manager-application/pull/11"},"issue":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/11"},"comments":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/andela-iakande/document-manager-application/statuses/916672a87d02e4471a2c9264b2ce155442787560"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":78,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"andela-iakande"}}