{"action":"created","comment":{"url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/comments/93411393","pull_request_review_id":13936936,"id":93411393,"diff_hunk":"@@ -0,0 +1,85 @@\n+# -*- coding: utf-8; -*-\n+#\n+# This file is part of Superdesk.\n+#\n+# Copyright 2013, 2014 Sourcefabric z.u. and contributors.\n+#\n+# For the full copyright and license information, please see the\n+# AUTHORS and LICENSE files distributed with this source code, or\n+# at https://www.sourcefabric.org/superdesk/license\n+\n+import logging\n+from flask import g\n+from superdesk.resource import Resource\n+from superdesk.services import BaseService\n+\n+log = logging.getLogger(__name__)\n+\n+\n+class AuditResource(Resource):\n+    endpoint_name = 'audit'\n+    resource_methods = ['GET']\n+    item_methods = ['GET']\n+    schema = {\n+        'resource': {'type': 'string'},\n+        'action': {'type': 'string'},\n+        'extra': {'type': 'dict'},\n+        'user': Resource.rel('users', False)\n+    }\n+    exclude = {endpoint_name, 'activity', 'dictionaries', 'macros'}","path":"superdesk/audit/audit.py","position":29,"original_position":29,"commit_id":"cbea074dce743b1a343918cc5daf0b65e8071a12","original_commit_id":"cbea074dce743b1a343918cc5daf0b65e8071a12","user":{"login":"petrjasek","id":179249,"avatar_url":"https://avatars.githubusercontent.com/u/179249?v=3","gravatar_id":"","url":"https://api.github.com/users/petrjasek","html_url":"https://github.com/petrjasek","followers_url":"https://api.github.com/users/petrjasek/followers","following_url":"https://api.github.com/users/petrjasek/following{/other_user}","gists_url":"https://api.github.com/users/petrjasek/gists{/gist_id}","starred_url":"https://api.github.com/users/petrjasek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrjasek/subscriptions","organizations_url":"https://api.github.com/users/petrjasek/orgs","repos_url":"https://api.github.com/users/petrjasek/repos","events_url":"https://api.github.com/users/petrjasek/events{/privacy}","received_events_url":"https://api.github.com/users/petrjasek/received_events","type":"User","site_admin":false},"body":"maybe there should be also `auth` for sessions, but this might be also filtered out via `g.user` ","created_at":"2016-12-21T10:19:00Z","updated_at":"2016-12-21T10:24:42Z","html_url":"https://github.com/superdesk/superdesk-core/pull/692#discussion_r93411393","pull_request_url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692","_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/comments/93411393"},"html":{"href":"https://github.com/superdesk/superdesk-core/pull/692#discussion_r93411393"},"pull_request":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692"}}},"pull_request":{"url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692","id":97691122,"html_url":"https://github.com/superdesk/superdesk-core/pull/692","diff_url":"https://github.com/superdesk/superdesk-core/pull/692.diff","patch_url":"https://github.com/superdesk/superdesk-core/pull/692.patch","issue_url":"https://api.github.com/repos/superdesk/superdesk-core/issues/692","number":692,"state":"open","locked":false,"title":"[SDESK-395] Purge the audit collection","user":{"login":"marwoodandrew","id":8639069,"avatar_url":"https://avatars.githubusercontent.com/u/8639069?v=3","gravatar_id":"","url":"https://api.github.com/users/marwoodandrew","html_url":"https://github.com/marwoodandrew","followers_url":"https://api.github.com/users/marwoodandrew/followers","following_url":"https://api.github.com/users/marwoodandrew/following{/other_user}","gists_url":"https://api.github.com/users/marwoodandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/marwoodandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwoodandrew/subscriptions","organizations_url":"https://api.github.com/users/marwoodandrew/orgs","repos_url":"https://api.github.com/users/marwoodandrew/repos","events_url":"https://api.github.com/users/marwoodandrew/events{/privacy}","received_events_url":"https://api.github.com/users/marwoodandrew/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-13T05:59:36Z","updated_at":"2016-12-21T10:24:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"440eaf07b773f8b64db095106e8af0a476f5b281","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/superdesk/superdesk-core/milestones/5","html_url":"https://github.com/superdesk/superdesk-core/milestone/5","labels_url":"https://api.github.com/repos/superdesk/superdesk-core/milestones/5/labels","id":2109053,"number":5,"title":"1.5","description":"","creator":{"login":"petrjasek","id":179249,"avatar_url":"https://avatars.githubusercontent.com/u/179249?v=3","gravatar_id":"","url":"https://api.github.com/users/petrjasek","html_url":"https://github.com/petrjasek","followers_url":"https://api.github.com/users/petrjasek/followers","following_url":"https://api.github.com/users/petrjasek/following{/other_user}","gists_url":"https://api.github.com/users/petrjasek/gists{/gist_id}","starred_url":"https://api.github.com/users/petrjasek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrjasek/subscriptions","organizations_url":"https://api.github.com/users/petrjasek/orgs","repos_url":"https://api.github.com/users/petrjasek/repos","events_url":"https://api.github.com/users/petrjasek/events{/privacy}","received_events_url":"https://api.github.com/users/petrjasek/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":38,"state":"open","created_at":"2016-11-02T10:03:33Z","updated_at":"2016-12-21T03:31:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692/commits","review_comments_url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692/comments","review_comment_url":"https://api.github.com/repos/superdesk/superdesk-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/superdesk/superdesk-core/issues/692/comments","statuses_url":"https://api.github.com/repos/superdesk/superdesk-core/statuses/cbea074dce743b1a343918cc5daf0b65e8071a12","head":{"label":"marwoodandrew:sdesk-395","ref":"sdesk-395","sha":"cbea074dce743b1a343918cc5daf0b65e8071a12","user":{"login":"marwoodandrew","id":8639069,"avatar_url":"https://avatars.githubusercontent.com/u/8639069?v=3","gravatar_id":"","url":"https://api.github.com/users/marwoodandrew","html_url":"https://github.com/marwoodandrew","followers_url":"https://api.github.com/users/marwoodandrew/followers","following_url":"https://api.github.com/users/marwoodandrew/following{/other_user}","gists_url":"https://api.github.com/users/marwoodandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/marwoodandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwoodandrew/subscriptions","organizations_url":"https://api.github.com/users/marwoodandrew/orgs","repos_url":"https://api.github.com/users/marwoodandrew/repos","events_url":"https://api.github.com/users/marwoodandrew/events{/privacy}","received_events_url":"https://api.github.com/users/marwoodandrew/received_events","type":"User","site_admin":false},"repo":{"id":41770827,"name":"superdesk-core","full_name":"marwoodandrew/superdesk-core","owner":{"login":"marwoodandrew","id":8639069,"avatar_url":"https://avatars.githubusercontent.com/u/8639069?v=3","gravatar_id":"","url":"https://api.github.com/users/marwoodandrew","html_url":"https://github.com/marwoodandrew","followers_url":"https://api.github.com/users/marwoodandrew/followers","following_url":"https://api.github.com/users/marwoodandrew/following{/other_user}","gists_url":"https://api.github.com/users/marwoodandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/marwoodandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwoodandrew/subscriptions","organizations_url":"https://api.github.com/users/marwoodandrew/orgs","repos_url":"https://api.github.com/users/marwoodandrew/repos","events_url":"https://api.github.com/users/marwoodandrew/events{/privacy}","received_events_url":"https://api.github.com/users/marwoodandrew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marwoodandrew/superdesk-core","description":null,"fork":true,"url":"https://api.github.com/repos/marwoodandrew/superdesk-core","forks_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/forks","keys_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/teams","hooks_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/hooks","issue_events_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/issues/events{/number}","events_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/events","assignees_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/assignees{/user}","branches_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/branches{/branch}","tags_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/tags","blobs_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/statuses/{sha}","languages_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/languages","stargazers_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/stargazers","contributors_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/contributors","subscribers_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/subscribers","subscription_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/subscription","commits_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/contents/{+path}","compare_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/merges","archive_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/downloads","issues_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/issues{/number}","pulls_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/pulls{/number}","milestones_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/milestones{/number}","notifications_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/labels{/name}","releases_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/releases{/id}","deployments_url":"https://api.github.com/repos/marwoodandrew/superdesk-core/deployments","created_at":"2015-09-02T00:40:11Z","updated_at":"2016-01-15T06:06:20Z","pushed_at":"2016-12-15T04:10:58Z","git_url":"git://github.com/marwoodandrew/superdesk-core.git","ssh_url":"git@github.com:marwoodandrew/superdesk-core.git","clone_url":"https://github.com/marwoodandrew/superdesk-core.git","svn_url":"https://github.com/marwoodandrew/superdesk-core","homepage":null,"size":8697,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"superdesk:master","ref":"master","sha":"d84766ba465d88ac1142ac834051afb5b898a2bb","user":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"repo":{"id":41092776,"name":"superdesk-core","full_name":"superdesk/superdesk-core","owner":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars.githubusercontent.com/u/5527298?v=3","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/superdesk/superdesk-core","description":"Common server modules for superdesk","fork":false,"url":"https://api.github.com/repos/superdesk/superdesk-core","forks_url":"https://api.github.com/repos/superdesk/superdesk-core/forks","keys_url":"https://api.github.com/repos/superdesk/superdesk-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdesk/superdesk-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdesk/superdesk-core/teams","hooks_url":"https://api.github.com/repos/superdesk/superdesk-core/hooks","issue_events_url":"https://api.github.com/repos/superdesk/superdesk-core/issues/events{/number}","events_url":"https://api.github.com/repos/superdesk/superdesk-core/events","assignees_url":"https://api.github.com/repos/superdesk/superdesk-core/assignees{/user}","branches_url":"https://api.github.com/repos/superdesk/superdesk-core/branches{/branch}","tags_url":"https://api.github.com/repos/superdesk/superdesk-core/tags","blobs_url":"https://api.github.com/repos/superdesk/superdesk-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdesk/superdesk-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdesk/superdesk-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdesk/superdesk-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdesk/superdesk-core/statuses/{sha}","languages_url":"https://api.github.com/repos/superdesk/superdesk-core/languages","stargazers_url":"https://api.github.com/repos/superdesk/superdesk-core/stargazers","contributors_url":"https://api.github.com/repos/superdesk/superdesk-core/contributors","subscribers_url":"https://api.github.com/repos/superdesk/superdesk-core/subscribers","subscription_url":"https://api.github.com/repos/superdesk/superdesk-core/subscription","commits_url":"https://api.github.com/repos/superdesk/superdesk-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdesk/superdesk-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdesk/superdesk-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdesk/superdesk-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdesk/superdesk-core/contents/{+path}","compare_url":"https://api.github.com/repos/superdesk/superdesk-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdesk/superdesk-core/merges","archive_url":"https://api.github.com/repos/superdesk/superdesk-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdesk/superdesk-core/downloads","issues_url":"https://api.github.com/repos/superdesk/superdesk-core/issues{/number}","pulls_url":"https://api.github.com/repos/superdesk/superdesk-core/pulls{/number}","milestones_url":"https://api.github.com/repos/superdesk/superdesk-core/milestones{/number}","notifications_url":"https://api.github.com/repos/superdesk/superdesk-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdesk/superdesk-core/labels{/name}","releases_url":"https://api.github.com/repos/superdesk/superdesk-core/releases{/id}","deployments_url":"https://api.github.com/repos/superdesk/superdesk-core/deployments","created_at":"2015-08-20T11:46:19Z","updated_at":"2016-12-15T09:10:15Z","pushed_at":"2016-12-21T10:09:15Z","git_url":"git://github.com/superdesk/superdesk-core.git","ssh_url":"git@github.com:superdesk/superdesk-core.git","clone_url":"https://github.com/superdesk/superdesk-core.git","svn_url":"https://github.com/superdesk/superdesk-core","homepage":"https://superdesk.readthedocs.io/","size":8812,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":4,"forks":32,"open_issues":4,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692"},"html":{"href":"https://github.com/superdesk/superdesk-core/pull/692"},"issue":{"href":"https://api.github.com/repos/superdesk/superdesk-core/issues/692"},"comments":{"href":"https://api.github.com/repos/superdesk/superdesk-core/issues/692/comments"},"review_comments":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692/comments"},"review_comment":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/superdesk/superdesk-core/pulls/692/commits"},"statuses":{"href":"https://api.github.com/repos/superdesk/superdesk-core/statuses/cbea074dce743b1a343918cc5daf0b65e8071a12"}}}}
{"actor":{"display_login":"petrjasek"}}