Hi,
I am working on a views access module. I'm puzzled if there is a way to access the $views->args attribute in a subclass of the views_plugin_access class. It seems the args attribute is not set at the moment the access check is done. Is there a way to cleanly inform the access callback in my code of the arguments of the view?

Cheers,
TUc

Comments

merlinofchaos’s picture

Status: Active » Closed (works as designed)

Unfortunately no; the access callback can happen very very early, before any processing is done. This is something I want to work on in the future, but for now you are going to need to use validators for argument-based access control.

borfast’s picture

merlinofchaos, how would one do that? Could you point us in the right direction, please?

merlinofchaos’s picture

The best thing I can do right now is point you to project module, which *has* implemented some arguments checking. Some changes went into Views for them, but anything I could explain will be made *much* more clear by simply going to project.module and looking at the access plugins there.

borfast’s picture

To see the project.module I shall go, then. :)

Thanks! :)