##// END OF EJS Templates
audit-logs: added web strip command to audit logs
marcink -
r1699:5efb37e3 default
parent child Browse files
Show More
@@ -22,6 +22,7 b' import logging'
22 from pyramid.view import view_config
22 from pyramid.view import view_config
23
23
24 from rhodecode.apps._base import RepoAppView
24 from rhodecode.apps._base import RepoAppView
25 from rhodecode.lib import audit_logger
25 from rhodecode.lib.auth import (LoginRequired, HasRepoPermissionAnyDecorator,
26 from rhodecode.lib.auth import (LoginRequired, HasRepoPermissionAnyDecorator,
26 NotAnonymous)
27 NotAnonymous)
27 from rhodecode.lib.ext_json import json
28 from rhodecode.lib.ext_json import json
@@ -102,6 +103,13 b' class StripView(RepoAppView):'
102 log.info('Stripped commit %s from repo `%s` by %s' % (
103 log.info('Stripped commit %s from repo `%s` by %s' % (
103 commit['rev'], c.repo_info.repo_name, user))
104 commit['rev'], c.repo_info.repo_name, user))
104 data[commit['rev']] = True
105 data[commit['rev']] = True
106
107 audit_logger.store(
108 action='repo.commit.strip',
109 action_data={'commit_id': commit['rev']},
110 repo=self.db_repo,
111 user=self._rhodecode_user, commit=True)
112
105 except Exception as e:
113 except Exception as e:
106 data[commit['rev']] = False
114 data[commit['rev']] = False
107 log.debug('Stripped commit %s from repo `%s` failed by %s, exeption %s' % (
115 log.debug('Stripped commit %s from repo `%s` failed by %s, exeption %s' % (
@@ -36,6 +36,7 b' ACTIONS = {'
36
36
37 'repo.add': {},
37 'repo.add': {},
38 'repo.edit': {},
38 'repo.edit': {},
39 'repo.commit.strip': {}
39 }
40 }
40
41
41
42
General Comments 0
You need to be logged in to leave comments. Login now