def enable_permission_auditing(session, permission_name, actor_user_id):
    permission = Permission.get(session, permission_name)
    if not permission:
        raise NoSuchPermission(name=permission_name)

    permission._audited = True

    AuditLog.log(session, actor_user_id, 'enable_auditing', 'Enabled auditing.',
            on_permission_id=permission.id)

    Counter.incr(session, "updates")

    session.commit()
Tests that the get_missing_for_target method of
dataset/ETHPy150Open dropbox/grouper/grouper/permissions.py/enable_permission_auditing--crossover with--dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/common/permissions/tests/tests.py/TestObjectPermissions.test_get_missing_for_target