I'm trying to make some of the reports in the Reports Menu only visible to registered users. I've gone to the Reports directory and opened the .xml files and changed <PGVReport access="PRIV_PUBLIC" to <PGVReport access="PRIV_USER" but the files I've changed can still be seen by the public.
Is there something else I have to change to make this work?
booma
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-11-26
I think the other thing you will need to do is delete the file phpgedview/index/reports.dat
Its where PGV stores the list of reports available on your system. After you delete it PGV will recreate it automatically, and it should then include your restrictions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've now moved all Reports to the USER status (none are visible to the public). I've edited the top links to hide the reports icon in the public view with
I'm trying to make some of the reports in the Reports Menu only visible to registered users. I've gone to the Reports directory and opened the .xml files and changed <PGVReport access="PRIV_PUBLIC" to <PGVReport access="PRIV_USER" but the files I've changed can still be seen by the public.
Is there something else I have to change to make this work?
booma
I think the other thing you will need to do is delete the file phpgedview/index/reports.dat
Its where PGV stores the list of reports available on your system. After you delete it PGV will recreate it automatically, and it should then include your restrictions.
Thank you kiwi that solves the problem.
I've now moved all Reports to the USER status (none are visible to the public). I've edited the top links to hide the reports icon in the public view with
$uname = getUserName();
if (! empty($uname)) {
$menu = $menubar->getReportsMenu();
if($menu->link != "") {
print "\t<td width=\"7%\" valign=\"top\">\n";
$menu->printMenu();
print "\t</td>\n";
}
Is there a way to hide the Reports Icon in Options for Individuals on the Individuals page when viewed by the public?
I *think* you should be able to fix both issues together by editing class_menubar.php.
At the top of the function getReportsMenu(), there is some code to return a null menu when
reports aren't available or the visitor is a search-engine.
You could change this to similarly reject non-logged-in users.
Instead of getUserName(), it is simpler to use the constant PGV_USER_ID.
This is zero for visitors and non-zero for users.
So change
if ((!file_exists("reportengine.php")) || (!empty($SEARCH_SPIDER))) {
to something like
if ((!file_exists("reportengine.php")) || !PGV_USER_ID) {
Oh, and this should do reports on the family page too.
Thanks fisharebest, seems to work okay. And it also hides the icon in the top link.
Thank you fisharebest, it was very useful for me too.