#NEWLINE# def enable_permission_auditing( session , permission_name , actor_user_id ) : #NEWLINE# #INDENT# 'Set a permission as audited.\n\n    Args:\n        session(models.base.session.Session): database session\n        permission_name(str): name of permission in question\n        actor_user_id(int): id of user who is enabling auditing\n    ' #NEWLINE# permission = Permission . get ( session , permission_name ) #NEWLINE# if ( not permission ) : #NEWLINE# #INDENT# raise NoSuchPermission ( name = permission_name ) #NEWLINE# #UNINDENT# permission . _audited = True #NEWLINE# AuditLog . log ( session , actor_user_id , 'enable_auditing' , 'Enabled auditing.' , on_permission_id = permission . id ) #NEWLINE# Counter . incr ( session , 'updates' ) #NEWLINE# session . commit ( )