setting version, preparing ubuntu packages and prepping links for release
[openemr.git] / Documentation / README.phpgacl
blobfabae24113db65296336b7470c20c177be8c6cc2
1              Hints for Using phpGACL with OpenEMR
2           by Rod Roark <rod at sunsetsystems dot com>
4 Installation Instructions
6 phpGACL access controls are embedded and installed by default in OpenEMR
7 versions 2.9.0.3 or later.  The administration of the access controls is
8 within OpenEMR in the admin->acl menu. The library/acl.inc file can be
9 easily modified to turn off phpGACL or to use an external version.
12 Upgrading Instructions
14 After you have upgraded to a new version of OpenEMR, you should
15 run the acl_upgrade.php program using your web browser
16 (e.g. http://openemr.location/acl_upgrade.php). This will ensure your
17 phpGACL database contains all the required OpenEMR Access Control
18 Objects.
21 For Developers
23 If you add a new Access Control Object to the OpenEMR codebase, then
24 also add it to the following three sites:
25 1. Header notes of the library/acl.inc file
26 2. acl_setup.php file
27 3. acl_upgrade.php file
30 Miscellaneous Information (the below information is only applicable
31 to OpenEMR versions less than 2.9.0.3 or to users who choose to
32 install an external version of phpGACL)
34 If you are using an OpenEMR version previous to 2.9.0.3, then phpGACL
35 has not been automatically installed.  Setting it up takes some careful
36 study, planning and a bit of time.  If you don't have the time then you
37 should hire an experienced person to set things up for you.  Helpful
38 installation and configuration instructions can be found on the wiki at the
39 www.open-emr.org site.
41 Alternatively, it's possible to set up your own access rules without
42 using phpGACL by customizing the code in library/acl.inc.  See that
43 module for more information.
45 phpGACL is available from http://phpgacl.sourceforge.net/.  Read
46 its documentation and install it according to its instructions.
47 Helpful installation and configuration instructions can also be
48 found on the wiki at the www.open-emr.org site.
50 The admin GUI needs to be protected, so add something like this
51 to your Apache configuration:
53   <Directory  "/var/www/phpgacl/admin">
54     AuthType Basic
55     AuthName "ACL Administrators"
56     AuthUserFile  /var/www/phpgacl/admin/.htpasswd
57     Require valid-user
58   </Directory>
60 And of course make an associated .htpasswd file at the corresponding
61 location.  See "man htpasswd2" if you have Apache 2.  Yes, it's quite
62 odd that the phpGACL GUI does not control access to itself!
64 Note that OpenEMR does not use AXOs, so ignore the AXO Group Admin
65 tab and other references to AXOs.
67 After you have installed phpGACL and modified library/acl.inc
68 appropriately, you should run the acl_setup.php program using your
69 web browser (e.g. http://openemr.location/acl_setup.php).  This will
70 create some required and sample objects in the phpGACL database for
71 OpenEMR.
73 acl_setup.php creates required Access Control Objects (ACOs, the
74 things to be protected), several sample Access Request Object (AROs
75 are the users requesting access), and their corresponding sections.
76 You may also create such objects yourself using the "ACL Admin"
77 tab of the phpGACL GUI.
79 The Access Control Objects (ACOs) for OpenEMR have a very specific
80 structure.  This is described in the file library/acl.inc, which
81 you must also modify in order to enable use of phpGACL.
83 You must manually create an ARO in this "users" section for each
84 OpenEMR user (except for the "admin" user which the setup program
85 creates).  The Value column must be the user's OpenEMR login name,
86 and the Name column can (should) be their full name.
88 By the way, values in the "Order" columns do not seem to be important.
89 I just plug in "10" for everything.  Names are cosmetic but should be
90 meaningful to you.  What really matters is the Value column.
92 Then you should define or modify groups and assign users (AROs) to
93 them using the "ARO Group Admin" tab of the GUI.  These can be
94 structured any way you like.  Here is one example of a group
95 heirarchy for a clinic setting:
97   Users
98     Accounting
99     Administrators
100     Assistants
101       Front Office
102       Lab
103       Medical
104     Nurses
105     Physicians
107 To see your access rules, click the "ACL List" tab.  To make corrections
108 click the corresponding Edit link on the right side; this will open the
109 ACL Admin tab with the corresponding selections already made, which you
110 can then change as desired and resubmit.  Note that the ACL List page
111 also provides for deleting entries.
113 The ACL Admin tab is also used to assign permissions.  This is
114 a really confusing "write only" interface, but thankfully you won't
115 have to use it every day!  Mostly what you will do here is highlight
116 a group from the box on the right, and also select some ACOs from the
117 top section by highlighting them and clicking the ">>" button.
118 Then if "write" or "wsome" or "addonly" access applies, key in that
119 as the return value, otherwise a return value is not required.  Then
120 click the Submit button to save that particular access rule.  Repeat
121 until all your ACL rules are defined.