My question is about the pnAPI, so I think this is the right place to post this question.
I am attempting to write some code to check if a News Article (or phpBB topic) is viewable (READ access) by an anonymous user.
The code I started with looks like this: (NOTE: this example is dealing with phpBB_14.)
if (pnSecAuthAction(0, 'phpBB_14::Forum', "$forum_name::", ACCESS_READ) && pnSecAuthAction(0, 'phpBB_14::Category', "$cat_title::", ACCESS_READ)) {
// do something
}
So in this example the code is checking whether the logged in user has READ access to either the Forum or Category of the queried post (not identified above) ... where
$forum_name and
$cat_title are variables that have been set after doing an initial
SQL query.
The problem is that
pnSecAuthAction only works for
the user that is logged in and running the script -- which in the example above is the Admin, and therefore would always have access.
Is there a way to check if a certain article (or topic, or category, or forum) has anonymous READ access -- while being logged in as ADMIN -- or without using pnSecAuthAction?
I have been searching through these forums for days and I can't find anything. Thanks.
--
alpo3