An example hook implementation out of the box would be a good way to ensure that the callbacks list in the Views UI is not empty by default. Either the attached patch can be used or the commented-out section mymodule_views_access_callbacks() can be ported to the .module file.

Comments

amarnus’s picture

StatusFileSize
new770 bytes
amarnus’s picture

Issue summary: View changes
maciej.zgadzaj’s picture

Status: Active » Closed (won't fix)

I don't really think this is needed. Such example callback won't introduce any new functionality (besides having the drop down non-empty, which might only confuse people), returning TRUE would work the same way as not using any access restriction at all, so there is really no point to it.

amarnus’s picture

Fair.

earthangelconsulting’s picture

well, considering that there's no readme file, maybe having an example of what the callbacks should look like (whether or not that's implemented as a working hook like above) might be a good thing ;-)

nice module though! once i figured out the callback structure, it works! handy indeed.

earthangelconsulting’s picture

ok, after i posted my last comment, i found the views_access_callback.api.php file, which DOES give a clear example.

my bad.