{"action":"created","comment":{"url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/comments/27991424","id":27991424,"diff_hunk":"@@ -329,20 +339,28 @@ def connect_to_rhn(self, credentials):\n             ca = self.rhncfg[\"sslCACert\"]\n             rpc_session.add_trusted_cert(ca)\n \n-            session_key = rpc_session.auth.login(credentials.username, credentials.password)\n+            if credentials.username and credentials.password:\n+                session_key = rpc_session.auth.login(credentials.username, credentials.password)\n+            else:\n+                session_key = None\n+\n             return (rpc_session, session_key)\n         except Exception, e:\n             log.exception(e)\n             system_exit(1, _(\"Unable to authenticate to legacy server.  \") + SEE_LOG_FILE)\n \n-    def check_is_org_admin(self, rpc_session, session_key, username):\n+    def check_has_access(self, rpc_session, session_key):\n         try:\n-            roles = rpc_session.user.listRoles(session_key, username)\n+            if session_key is None:\n+                # We should not never be here.  This method has a guard that keeps it from being","path":"src/subscription_manager/migrate/migrate.py","position":55,"original_position":55,"commit_id":"652db86663a1018a0b7dba767b78c839ca0e5877","original_commit_id":"652db86663a1018a0b7dba767b78c839ca0e5877","user":{"login":"wottop","id":1753002,"avatar_url":"https://avatars.githubusercontent.com/u/1753002?v=3","gravatar_id":"","url":"https://api.github.com/users/wottop","html_url":"https://github.com/wottop","followers_url":"https://api.github.com/users/wottop/followers","following_url":"https://api.github.com/users/wottop/following{/other_user}","gists_url":"https://api.github.com/users/wottop/gists{/gist_id}","starred_url":"https://api.github.com/users/wottop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wottop/subscriptions","organizations_url":"https://api.github.com/users/wottop/orgs","repos_url":"https://api.github.com/users/wottop/repos","events_url":"https://api.github.com/users/wottop/events{/privacy}","received_events_url":"https://api.github.com/users/wottop/received_events","type":"User","site_admin":false},"body":"We should never be here.","created_at":"2015-04-08T17:17:55Z","updated_at":"2015-04-08T17:17:55Z","html_url":"https://github.com/candlepin/subscription-manager/pull/1155#discussion_r27991424","pull_request_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155","_links":{"self":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/comments/27991424"},"html":{"href":"https://github.com/candlepin/subscription-manager/pull/1155#discussion_r27991424"},"pull_request":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155"}}},"pull_request":{"url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155","id":31756755,"html_url":"https://github.com/candlepin/subscription-manager/pull/1155","diff_url":"https://github.com/candlepin/subscription-manager/pull/1155.diff","patch_url":"https://github.com/candlepin/subscription-manager/pull/1155.patch","issue_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/1155","number":1155,"state":"open","locked":false,"title":"Awood/no auth migration","user":{"login":"awood","id":17975,"avatar_url":"https://avatars.githubusercontent.com/u/17975?v=3","gravatar_id":"","url":"https://api.github.com/users/awood","html_url":"https://github.com/awood","followers_url":"https://api.github.com/users/awood/followers","following_url":"https://api.github.com/users/awood/following{/other_user}","gists_url":"https://api.github.com/users/awood/gists{/gist_id}","starred_url":"https://api.github.com/users/awood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awood/subscriptions","organizations_url":"https://api.github.com/users/awood/orgs","repos_url":"https://api.github.com/users/awood/repos","events_url":"https://api.github.com/users/awood/events{/privacy}","received_events_url":"https://api.github.com/users/awood/received_events","type":"User","site_admin":false},"body":"Addresses https://bugzilla.redhat.com/show_bug.cgi?id=1180273 and https://bugzilla.redhat.com/show_bug.cgi?id=1086367\r\n\r\nResolves #919","created_at":"2015-03-23T17:48:57Z","updated_at":"2015-04-08T17:17:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c296afabb9b64bfd1eafa34f4bad277322a8f38","assignee":{"login":"wottop","id":1753002,"avatar_url":"https://avatars.githubusercontent.com/u/1753002?v=3","gravatar_id":"","url":"https://api.github.com/users/wottop","html_url":"https://github.com/wottop","followers_url":"https://api.github.com/users/wottop/followers","following_url":"https://api.github.com/users/wottop/following{/other_user}","gists_url":"https://api.github.com/users/wottop/gists{/gist_id}","starred_url":"https://api.github.com/users/wottop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wottop/subscriptions","organizations_url":"https://api.github.com/users/wottop/orgs","repos_url":"https://api.github.com/users/wottop/repos","events_url":"https://api.github.com/users/wottop/events{/privacy}","received_events_url":"https://api.github.com/users/wottop/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155/commits","review_comments_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155/comments","review_comment_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/1155/comments","statuses_url":"https://api.github.com/repos/candlepin/subscription-manager/statuses/652db86663a1018a0b7dba767b78c839ca0e5877","head":{"label":"candlepin:awood/no-auth-migration","ref":"awood/no-auth-migration","sha":"652db86663a1018a0b7dba767b78c839ca0e5877","user":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"repo":{"id":4360334,"name":"subscription-manager","full_name":"candlepin/subscription-manager","owner":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/candlepin/subscription-manager","description":"A GUI and CLI client for Candlepin","fork":false,"url":"https://api.github.com/repos/candlepin/subscription-manager","forks_url":"https://api.github.com/repos/candlepin/subscription-manager/forks","keys_url":"https://api.github.com/repos/candlepin/subscription-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/candlepin/subscription-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/candlepin/subscription-manager/teams","hooks_url":"https://api.github.com/repos/candlepin/subscription-manager/hooks","issue_events_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/events{/number}","events_url":"https://api.github.com/repos/candlepin/subscription-manager/events","assignees_url":"https://api.github.com/repos/candlepin/subscription-manager/assignees{/user}","branches_url":"https://api.github.com/repos/candlepin/subscription-manager/branches{/branch}","tags_url":"https://api.github.com/repos/candlepin/subscription-manager/tags","blobs_url":"https://api.github.com/repos/candlepin/subscription-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/candlepin/subscription-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/candlepin/subscription-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/candlepin/subscription-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/candlepin/subscription-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/candlepin/subscription-manager/languages","stargazers_url":"https://api.github.com/repos/candlepin/subscription-manager/stargazers","contributors_url":"https://api.github.com/repos/candlepin/subscription-manager/contributors","subscribers_url":"https://api.github.com/repos/candlepin/subscription-manager/subscribers","subscription_url":"https://api.github.com/repos/candlepin/subscription-manager/subscription","commits_url":"https://api.github.com/repos/candlepin/subscription-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/candlepin/subscription-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/candlepin/subscription-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/candlepin/subscription-manager/contents/{+path}","compare_url":"https://api.github.com/repos/candlepin/subscription-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/candlepin/subscription-manager/merges","archive_url":"https://api.github.com/repos/candlepin/subscription-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/candlepin/subscription-manager/downloads","issues_url":"https://api.github.com/repos/candlepin/subscription-manager/issues{/number}","pulls_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/candlepin/subscription-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/candlepin/subscription-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/candlepin/subscription-manager/labels{/name}","releases_url":"https://api.github.com/repos/candlepin/subscription-manager/releases{/id}","created_at":"2012-05-17T16:13:30Z","updated_at":"2015-04-08T16:11:06Z","pushed_at":"2015-04-08T16:11:08Z","git_url":"git://github.com/candlepin/subscription-manager.git","ssh_url":"git@github.com:candlepin/subscription-manager.git","clone_url":"https://github.com/candlepin/subscription-manager.git","svn_url":"https://github.com/candlepin/subscription-manager","homepage":"http://candlepinproject.org/","size":35710,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":6,"forks":18,"open_issues":6,"watchers":15,"default_branch":"master"}},"base":{"label":"candlepin:master","ref":"master","sha":"6470ef02a7d1ca01b39d5276eba1ae92c17ae0dd","user":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"repo":{"id":4360334,"name":"subscription-manager","full_name":"candlepin/subscription-manager","owner":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/candlepin/subscription-manager","description":"A GUI and CLI client for Candlepin","fork":false,"url":"https://api.github.com/repos/candlepin/subscription-manager","forks_url":"https://api.github.com/repos/candlepin/subscription-manager/forks","keys_url":"https://api.github.com/repos/candlepin/subscription-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/candlepin/subscription-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/candlepin/subscription-manager/teams","hooks_url":"https://api.github.com/repos/candlepin/subscription-manager/hooks","issue_events_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/events{/number}","events_url":"https://api.github.com/repos/candlepin/subscription-manager/events","assignees_url":"https://api.github.com/repos/candlepin/subscription-manager/assignees{/user}","branches_url":"https://api.github.com/repos/candlepin/subscription-manager/branches{/branch}","tags_url":"https://api.github.com/repos/candlepin/subscription-manager/tags","blobs_url":"https://api.github.com/repos/candlepin/subscription-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/candlepin/subscription-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/candlepin/subscription-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/candlepin/subscription-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/candlepin/subscription-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/candlepin/subscription-manager/languages","stargazers_url":"https://api.github.com/repos/candlepin/subscription-manager/stargazers","contributors_url":"https://api.github.com/repos/candlepin/subscription-manager/contributors","subscribers_url":"https://api.github.com/repos/candlepin/subscription-manager/subscribers","subscription_url":"https://api.github.com/repos/candlepin/subscription-manager/subscription","commits_url":"https://api.github.com/repos/candlepin/subscription-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/candlepin/subscription-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/candlepin/subscription-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/candlepin/subscription-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/candlepin/subscription-manager/contents/{+path}","compare_url":"https://api.github.com/repos/candlepin/subscription-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/candlepin/subscription-manager/merges","archive_url":"https://api.github.com/repos/candlepin/subscription-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/candlepin/subscription-manager/downloads","issues_url":"https://api.github.com/repos/candlepin/subscription-manager/issues{/number}","pulls_url":"https://api.github.com/repos/candlepin/subscription-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/candlepin/subscription-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/candlepin/subscription-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/candlepin/subscription-manager/labels{/name}","releases_url":"https://api.github.com/repos/candlepin/subscription-manager/releases{/id}","created_at":"2012-05-17T16:13:30Z","updated_at":"2015-04-08T16:11:06Z","pushed_at":"2015-04-08T16:11:08Z","git_url":"git://github.com/candlepin/subscription-manager.git","ssh_url":"git@github.com:candlepin/subscription-manager.git","clone_url":"https://github.com/candlepin/subscription-manager.git","svn_url":"https://github.com/candlepin/subscription-manager","homepage":"http://candlepinproject.org/","size":35710,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":6,"forks":18,"open_issues":6,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155"},"html":{"href":"https://github.com/candlepin/subscription-manager/pull/1155"},"issue":{"href":"https://api.github.com/repos/candlepin/subscription-manager/issues/1155"},"comments":{"href":"https://api.github.com/repos/candlepin/subscription-manager/issues/1155/comments"},"review_comments":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155/comments"},"review_comment":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/candlepin/subscription-manager/pulls/1155/commits"},"statuses":{"href":"https://api.github.com/repos/candlepin/subscription-manager/statuses/652db86663a1018a0b7dba767b78c839ca0e5877"}}}}