Giter Site home page Giter Site logo

Comments (8)

Blizzke avatar Blizzke commented on August 28, 2024 1

1.1.2 has 2 new variables: $trackErrorActions and $ignoreErrorActions. They work the same as the regular ones but for errors. Please note that due to how Yii works (logException functionality) there's no consistent ActionEvent instance to verify (to obtain the route). To get around that, the error handler uses Yii::$app->requestedRoute

from yii2-audit.

Blizzke avatar Blizzke commented on August 28, 2024

The way things are implemented, *as entry won't work for either situation, it was never meant to as that makes little sense.
Do you have an example of a situation where either */part or part/* doesn't do what it's supposed to?

from yii2-audit.

neoacevedo avatar neoacevedo commented on August 28, 2024

'ignoreActions' => ['audit/*', 'debug/*', '*/index'],:

screenshot_20190110_135453

from yii2-audit.

Blizzke avatar Blizzke commented on August 28, 2024

It's weird. I ran it on a test project with just the ignoreActions defined like you specified them, and it's nicely ignoring the site/index views (that's what I tested), as it should. Is there something else configured or do you something with the $uniqueId of Yii's ActionEvent?

from yii2-audit.

neoacevedo avatar neoacevedo commented on August 28, 2024

It's a clear yii2 app, although good, I'm using the advanced app and I have set this in backend's config for RBAC:

'as access' => [
    'class' => backend\filters\AccessControl::class,
    'allowActions' => ['site/login', 'site/logout', 'site/error', 'debug', 'gii']
]

from yii2-audit.

borraz avatar borraz commented on August 28, 2024

I have a similar problem:

'ignoreActions' => ['audit/*', 'debug/*', 'certificate/*'],

image

When the request_method is not GET the ignoreActions dont work as expected.

from yii2-audit.

marty-macfly avatar marty-macfly commented on August 28, 2024

Hello,

I've reproduce the same issue and it seems to be related to the error handler \bedezign\yii2\audit\components\web\ErrorHandler creating the audit entry and not the Audit->onBeforeAction method that use the ignoreActions filter.

If I'm disabling error handler I don't have the audit entry anymore. Here is the stack trace I can see:

/app/vendor/lbn/yii2-config/src/db/mysql/Command.php:25
/app/vendor/lbn/yii2-config/src/db/mysql/Command.php:60
/app/vendor/bedezign/yii2-audit/src/models/AuditEntry.php:166
/app/vendor/bedezign/yii2-audit/src/models/AuditEntry.php:55
/app/vendor/bedezign/yii2-audit/src/Audit.php:321
/app/vendor/bedezign/yii2-audit/src/components/base/ErrorHandlerTrait.php:38

from yii2-audit.

Blizzke avatar Blizzke commented on August 28, 2024

Okay, got it.
Errors by default are always logged as it is assumed that that is exactly the information you want.
I can however see that you might not want specific entries so I'll see if I can add a second set of tracking-filters for error specifically.

from yii2-audit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.