batchom and language comments added
[openemr.git] / Documentation / README.phpgacl
blobcf272fe3a47d8bf35e2e839505f685d9a8c78158
1              Hints for Using phpGACL with OpenEMR
2           by Rod Roark <rod at sunsetsystems dot com>
5 OpenEMR by default does not use or require phpGACL, though it is
6 highly recommended.  Setting it up takes some careful study, planning
7 and a bit of time.  If you don't have the time then you should hire
8 an experienced person to set things up for you.  The following tips
9 are for the adventurous only!
11 Alternatively, it's possible to set up your own access rules without
12 using phpGACL by customizing the code in library/acl.inc.  See that
13 module for more information.
15 phpGACL is available from http://phpgacl.sourceforge.net/.  Read
16 its documentation and install it according to its instructions.
18 The admin GUI needs to be protected, so add something like this
19 to your Apache configuration:
21   <Directory  "/var/www/phpgacl/admin">
22     AuthType Basic
23     AuthName "ACL Administrators"
24     AuthUserFile  /var/www/phpgacl/admin/.htpasswd
25     Require valid-user
26   </Directory>
28 And of course make an associated .htpasswd file at the corresponding
29 location.  See "man htpasswd2" if you have Apache 2.  Yes, it's quite
30 odd that the phpGACL GUI does not control access to itself!
32 Note that OpenEMR does not use AXOs, so ignore the AXO Group Admin
33 tab and other references to AXOs.
35 After you have installed phpGACL and modified library/acl.inc
36 appropriately, you should run the acl_setup.php program using your
37 web browser (e.g. http://openemr.location/acl_setup.php).  This will
38 create some required and sample objects in the phpGACL database for
39 OpenEMR.
41 acl_setup.php creates required Access Control Objects (ACOs, the
42 things to be protected), a sample Access Request Object (AROs are
43 the users requesting access), and their corresponding sections.
44 You may also create such objects yourself using the "ACL Admin"
45 tab of the phpGACL GUI.
47 The Access Control Objects (ACOs) for OpenEMR have a very specific
48 structure.  This is described in the file library/acl.inc, which
49 you must also modify in order to enable use of phpGACL.
51 You must manually create an ARO in this "users" section for each
52 OpenEMR user (except for the "admin" user which the setup program
53 creates).  The Value column must be the user's OpenEMR login name,
54 and the Name column can (should) be their full name.
56 By the way, values in the "Order" columns do not seem to be important.
57 I just plug in "10" for everything.  Names are cosmetic but should be
58 meaningful to you.  What really matters is the Value column.
60 Then you should define or modify groups and assign users (AROs) to
61 them using the "ARO Group Admin" tab of the GUI.  These can be
62 structured any way you like.  Here is one example of a group
63 heirarchy for a clinic setting:
65   Users
66     Accounting
67     Administrators
68     Assistants
69       Front Office
70       Lab
71       Medical
72     Nurses
73     Physicians
75 To see your access rules, click the "ACL List" tab.  To make corrections
76 click the corresponding Edit link on the right side; this will open the
77 ACL Admin tab with the corresponding selections already made, which you
78 can then change as desired and resubmit.  Note that the ACL List page
79 also provides for deleting entries.
81 The ACL Admin tab is also used to assign permissions.  This is
82 a really confusing "write only" interface, but thankfully you won't
83 have to use it every day!  Mostly what you will do here is highlight
84 a group from the box on the right, and also select some ACOs from the
85 top section by highlighting them and clicking the ">>" button.
86 Then if "write" or "wsome" or "addonly" access applies, key in that
87 as the return value, otherwise a return value is not required.  Then
88 click the Submit button to save that particular access rule.  Repeat
89 until all your ACL rules are defined.