GitHub PullRequestReviewCommentEvent at 2014-11-18 20:15:12
Repository: invenio
Actor: kaplun
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/20534657","id":20534657,"diff_hunk":"@@ -36,6 +38,20 @@\n                            CFG_BIBEDIT_ADD_TICKET_RT_QUEUES\n \n \n+def get_uid_based_on_pref(prefname, prefvalue):\n+    \"\"\"get the user's UID based where his/her preference prefname has value prefvalue in preferences\"\"\"\n+    prefs = run_sql(\"SELECT id, settings FROM user WHERE settings is not NULL\")\n+    the_uid = None\n+    for pref in prefs:\n+        try:\n+            settings = deserialize_via_marshal(pref[1])\n+            if (prefname in settings) and (settings[prefname] == prefvalue):\n+                the_uid = pref[0]\n+        except:\n+            pass","path":"invenio/legacy/bibcatalog/system_rt.py","position":27,"original_position":27,"commit_id":"8d7d19188dbd5edc8c328a3a35146bf5a0209eba","original_commit_id":"16cf3a1da9be4c8783ca66c31f44017e4f9d4193","user":{"login":"kaplun","id":119349,"avatar_url":"https://avatars.githubusercontent.com/u/119349?v=3","gravatar_id":"","url":"https://api.github.com/users/kaplun","html_url":"https://github.com/kaplun","followers_url":"https://api.github.com/users/kaplun/followers","following_url":"https://api.github.com/users/kaplun/following{/other_user}","gists_url":"https://api.github.com/users/kaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/kaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaplun/subscriptions","organizations_url":"https://api.github.com/users/kaplun/orgs","repos_url":"https://api.github.com/users/kaplun/repos","events_url":"https://api.github.com/users/kaplun/events{/privacy}","received_events_url":"https://api.github.com/users/kaplun/received_events","type":"User","site_admin":false},"body":"Indeed this function should die! For RT, do we actual need to create tickets logging in with the corresponding user? Can't we use a single account which can act on behalf of the user?","created_at":"2014-11-18T20:15:12Z","updated_at":"2014-11-18T20:15:12Z","html_url":"https://github.com/inveniosoftware/invenio/pull/2529#discussion_r20534657","pull_request_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/20534657"},"html":{"href":"https://github.com/inveniosoftware/invenio/pull/2529#discussion_r20534657"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529","id":24523993,"html_url":"https://github.com/inveniosoftware/invenio/pull/2529","diff_url":"https://github.com/inveniosoftware/invenio/pull/2529.diff","patch_url":"https://github.com/inveniosoftware/invenio/pull/2529.patch","issue_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/2529","number":2529,"state":"closed","locked":false,"title":"access: new has_(super)_admin_role methods","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"body":"* PEP8/257 improvements.\r\n* Adds simple Flask-Admin interface for access models.\r\n* Cleans legacy `webuser` usage.","created_at":"2014-11-17T09:47:15Z","updated_at":"2014-11-18T20:15:12Z","closed_at":"2014-11-18T12:08:18Z","merged_at":"2014-11-18T12:08:18Z","merge_commit_sha":"d47d6f4cdb7ecccc9f9a5fae13f639fdbcb9e4ae","assignee":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/6","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/6/labels","id":696686,"number":6,"title":"v2.x","description":"","creator":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"open_issues":112,"closed_issues":57,"state":"open","created_at":"2014-06-20T11:43:39Z","updated_at":"2014-11-18T12:08:18Z","due_on":"2020-01-01T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/{number}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/2529/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio/statuses/8d7d19188dbd5edc8c328a3a35146bf5a0209eba","head":{"label":"jirikuncar:2509-is-admin","ref":"2509-is-admin","sha":"8d7d19188dbd5edc8c328a3a35146bf5a0209eba","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"repo":{"id":16106422,"name":"invenio","full_name":"jirikuncar/invenio","owner":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jirikuncar/invenio","description":"For contribution please check: https://github.com/jirikuncar/invenio/wiki/Contributor-checklist","fork":true,"url":"https://api.github.com/repos/jirikuncar/invenio","forks_url":"https://api.github.com/repos/jirikuncar/invenio/forks","keys_url":"https://api.github.com/repos/jirikuncar/invenio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jirikuncar/invenio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jirikuncar/invenio/teams","hooks_url":"https://api.github.com/repos/jirikuncar/invenio/hooks","issue_events_url":"https://api.github.com/repos/jirikuncar/invenio/issues/events{/number}","events_url":"https://api.github.com/repos/jirikuncar/invenio/events","assignees_url":"https://api.github.com/repos/jirikuncar/invenio/assignees{/user}","branches_url":"https://api.github.com/repos/jirikuncar/invenio/branches{/branch}","tags_url":"https://api.github.com/repos/jirikuncar/invenio/tags","blobs_url":"https://api.github.com/repos/jirikuncar/invenio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jirikuncar/invenio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jirikuncar/invenio/git/refs{/sha}","trees_url":"https://api.github.com/repos/jirikuncar/invenio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jirikuncar/invenio/statuses/{sha}","languages_url":"https://api.github.com/repos/jirikuncar/invenio/languages","stargazers_url":"https://api.github.com/repos/jirikuncar/invenio/stargazers","contributors_url":"https://api.github.com/repos/jirikuncar/invenio/contributors","subscribers_url":"https://api.github.com/repos/jirikuncar/invenio/subscribers","subscription_url":"https://api.github.com/repos/jirikuncar/invenio/subscription","commits_url":"https://api.github.com/repos/jirikuncar/invenio/commits{/sha}","git_commits_url":"https://api.github.com/repos/jirikuncar/invenio/git/commits{/sha}","comments_url":"https://api.github.com/repos/jirikuncar/invenio/comments{/number}","issue_comment_url":"https://api.github.com/repos/jirikuncar/invenio/issues/comments/{number}","contents_url":"https://api.github.com/repos/jirikuncar/invenio/contents/{+path}","compare_url":"https://api.github.com/repos/jirikuncar/invenio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jirikuncar/invenio/merges","archive_url":"https://api.github.com/repos/jirikuncar/invenio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jirikuncar/invenio/downloads","issues_url":"https://api.github.com/repos/jirikuncar/invenio/issues{/number}","pulls_url":"https://api.github.com/repos/jirikuncar/invenio/pulls{/number}","milestones_url":"https://api.github.com/repos/jirikuncar/invenio/milestones{/number}","notifications_url":"https://api.github.com/repos/jirikuncar/invenio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jirikuncar/invenio/labels{/name}","releases_url":"https://api.github.com/repos/jirikuncar/invenio/releases{/id}","created_at":"2014-01-21T15:23:07Z","updated_at":"2014-11-18T12:08:23Z","pushed_at":"2014-11-18T12:08:22Z","git_url":"git://github.com/jirikuncar/invenio.git","ssh_url":"git@github.com:jirikuncar/invenio.git","clone_url":"https://github.com/jirikuncar/invenio.git","svn_url":"https://github.com/jirikuncar/invenio","homepage":"http://invenio-software.org/","size":86789,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":5,"default_branch":"pu"}},"base":{"label":"inveniosoftware:pu","ref":"pu","sha":"5d83ddaa32d6d349f5817d65c31e5dad7c0339ba","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":2665618,"name":"invenio","full_name":"inveniosoftware/invenio","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/invenio","description":"Invenio digital library software","fork":false,"url":"https://api.github.com/repos/inveniosoftware/invenio","forks_url":"https://api.github.com/repos/inveniosoftware/invenio/forks","keys_url":"https://api.github.com/repos/inveniosoftware/invenio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/invenio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/invenio/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/invenio/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/invenio/events","assignees_url":"https://api.github.com/repos/inveniosoftware/invenio/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/invenio/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/invenio/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/invenio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/invenio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/invenio/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/invenio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/invenio/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/invenio/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/invenio/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/invenio/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/invenio/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/invenio/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/invenio/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/comments/{number}","contents_url":"https://api.github.com/repos/inveniosoftware/invenio/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/invenio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/invenio/merges","archive_url":"https://api.github.com/repos/inveniosoftware/invenio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/invenio/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/invenio/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/invenio/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/invenio/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/invenio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/invenio/releases{/id}","created_at":"2011-10-28T14:33:51Z","updated_at":"2014-11-18T14:06:15Z","pushed_at":"2014-11-18T14:06:15Z","git_url":"git://github.com/inveniosoftware/invenio.git","ssh_url":"git@github.com:inveniosoftware/invenio.git","clone_url":"https://github.com/inveniosoftware/invenio.git","svn_url":"https://github.com/inveniosoftware/invenio","homepage":"http://invenio-software.org/","size":90120,"stargazers_count":37,"watchers_count":37,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":884,"forks":104,"open_issues":884,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529"},"html":{"href":"https://github.com/inveniosoftware/invenio/pull/2529"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/invenio/issues/2529"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio/issues/2529/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/invenio/pulls/2529/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/invenio/statuses/8d7d19188dbd5edc8c328a3a35146bf5a0209eba"}}}}