Access control

drex5 wrote on Wednesday, July 02, 2008:

Hi folks
There is a global setting:
$GLOBALS[‘docs_see_entire_calendar’] = false;

I expected that each ‘normal’ user, eg ‘doc’, would only be able to see their own appointments. Instead they can see the administrator’s, unless I ‘authorise’ them, in which case they see everything.

In my situation the practitioners should strictly only see their own info / clients.

Surely that is possible…?

Can anyone help me find where it is set? Obviously not by $GLOBALS[‘docs_see_entire_calendar’] = false;  :wink:

Many thanks.

bradymiller wrote on Wednesday, July 02, 2008:

hey,

  This bug is in version 2.8.3, but has been fixed in the current CVS version. Check out this thread for more details(it only requires addition of a single line of code to fix):
http://sourceforge.net/forum/forum.php?thread_id=1865276&forum_id=202504

-Brady

drex5 wrote on Wednesday, July 02, 2008:

Thank you, that’s useful. I’ve tried inserting the code line either side of
// From Michael Brinson 2006-09-19:
if ($_POST[‘pc_username’]) $_SESSION[‘pc_username’] = $_POST[‘pc_username’];

but no effect …

Any other ideas?

drex5 wrote on Thursday, July 03, 2008:

Brady, I’ve browsed the CVS online, but can’t find your fix there…? Possibly I’m looking in the wrong place.

As far as I can tell, the module is being called with $type = ‘user’ by default, but I can’t find where the module is. The whole calendar thing is buried under multiple layers.

Ah, the joys of open source software :wink:

bradymiller wrote on Friday, July 04, 2008:

hey,

my fix is in revision 1.4 of file:
/openemr/interface/main/calendar/index.php

It also looks like Jason added another line for this bug in revision 1.6

what version of OpenEMR are you using?

-Brady

drex5 wrote on Friday, July 04, 2008:

2.8.3, which has interface/main/calendar/index.php at v1.2

Reading your previous thread, I tried to install 2.8.2 alongside 2.8.3, in a different folder with different database, but that failed. I then deleted both openemr folders and the databases and rebooted.

Installed 2.8.2 with a folder and database with new names, but now it will not start. Does openemr persist somewhere else?

Thanks for the help…

bradymiller wrote on Monday, July 07, 2008:

hey,

May be time to re-install from scratch. I’m surprised that the insertion of above line didn’t work for your version 2.8.3(perhaps it will work after a re-install). I wouldn’t go to a previous version to solve this(as I recall this bug is in previous versions also), since there’s lots of improvements in the latest version. The CVS version and soon to be released 2.8.4 version do not have this bug.(I tested this on the cvs demo at http://opensourceemr.com:2089/openemr user:admin pass:pass ; try adding new user to this to see for yourself) If your still having probs with fixing bug in 2.8.3 I’ll insert that line of code into one of the 2.8.3 demos to re-test it.

-Brady

drex5 wrote on Tuesday, July 08, 2008:

Thanks Brady

I’m afraid we’ve given up the struggle and bought else something off the shelf.

Still puzzled why I couldn’t delete and re-install… but not to worry.

Thanks again for your help.