Menu

Not Authorized to Back-up.

Help
2012-09-13
2013-04-06
  • Jeff Guillory Jr.

    Since upgrading to 4.1.1 when I clicked on Administration -> Backup and clicked on "Create Backup,"  It shows a white screen and states "Not authorized!"

    Thanks for any help.

    Jeff Guillory
    NP Health Clinic

     
  • Kevin Yeh

    Kevin Yeh - 2012-09-14

    My suggestion for a quick fix would be to download the 4.1.0 patch 13 version of library/acl.inc from here:
    https://raw.github.com/openemr/openemr/rel-410/library/acl.inc
    and replace.

     
  • Brady Miller

    Brady Miller - 2012-09-14

    Hi,

    I did lots of ACL testing with that new fix before the release and it looked good. However, just hit me what is likely happening here. For example, in Administration->ACL, if you place the Demographics ACO in both the addonly and write return ACL bad things will happen. Which makes total sense, because return $gacl_object->acl_return_value() will try to return two values (I am not sure what is actually does, but whatever it returns, it breaks the code. So, an aco should only ever be in one ACL of the same group; if it is in more than one return value acl of the same group, then bad things will happen.

    That will break things where doing acl_check and seeing if equivalent to addonly or write etc.

    That being said, I have not been able to reproduce why the backup script is breaking, which uses:

    if (!acl_check('admin', 'super')) die(xl('Not authorized','','','!'));
    

    The question here is that does it make sense to revert the 4.1.1 release back to the original acl_check function until this is sorted out (for example, could make the Administration->ACL script not allow ACO's in more than one group return value and issue warnings if currently the case.

    thoughts?

    -brady
    OpenEMR

     
  • Brady Miller

    Brady Miller - 2012-09-14

    Hi,

    Did some testing and turns out that the $gacl_object->acl_return_value() function only return one return value and it chooses the most recently added one. So, if I were to add the demographics ACO to write, then to addonly, this means a user would not be able to edit the demographics (only has addonly privileges).

    And this actually gets much worse. Because a user can be added into multiple groups, so there is simply no way to control which return value is given back if the user has different return values in different groups.

    I think we need to revert to old acl function and rethink this. I think the way to go is not to request the return value from the gacl function $gacl_object->acl_return_value() when looking for a specific return value since this does not work. We need to collect all the permitted return values and then see if one of them is the one we want (such as write, addonly etc.). This may require a small bit of code mod in gacl itself, but I think this may be the way we need to go(could potentially modify/rename the gacl acl_return_value function a bit by adding a parameter for the return value to check for and then to simply return a true/false; note would require modifying codebase to place the specific return value in the function parameter rather than test equality of it).

    -brady
    OpenEMR

     
  • Jeff Guillory Jr.

    So you recommend I replace that file with the one from the backed up openemr 4.0.11 file? 

    Jeff

     
  • Jeff Guillory Jr.

    I replaced the acl.inc file with the backup file from openemr4.0.11.  This did not help.  Still getting the "Access not allowed" error. 

    The title over the box that pops up is:                      "https://server.com/openemr/interface/main/calendar/add_edit_event.php?startampm=1&starttimeh=10&userid=2&starttimem=15&date=20120914&catid=0"  I hope that can help.

    Seeing patients without the scheduler working is very tough.  It is essential for smooth office flow.

    Thanks again to anyone who can help.

    Jeff Guillory
    NP Health Clinic

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.