[Sahana_proj] FW: ACL problem

de Lanerolle, Trishan R. Trishan.deLanerolle at trincoll.edu
Tue Nov 28 20:58:55 EST 2006


Message from Bach forwarded to list, as there seems to be a problem with mail from Wesleyan.

Trishan de Lanerolle'04
Computer Science/Engineering
Technology Coordinator
Systems and Networking
LITC B35
Trinity College
(860) 297 5313



-----Original Message-----
From: bach dao [mailto:bdao at wesleyan.edu]
Sent: Tue 11/28/2006 6:54 PM
To: de Lanerolle, Trishan R.
Subject: FW: ACL problem
 
Hi Trishan, 

 

Here is the message I tried to post with the attached file.

 

 

Hi, 

 

I am Bach from Wesleyan. I am having some problems with the ACL set up. I
have made an admin.inc file with ACL install script. I ran the option to run
ACL script in the admin module but it said that the script is not correct. I
attached my admin.inc file so everyone can see and tell me what you think. 

 

Best, 

 

Bach Vu Dao

4306, 222 Church Street

Middletown, CT06459

860-759-4296

 


-------------- next part --------------
<?php
 	include_once $global['approot']. 'inc/lib_security/acl_api.inc';
	include_once $global['approot']. 'inc/lib_security/acl.inc';
	include_once $global['approot']. 'inc/lib_security/authenticate.inc';

function shn_hr_adm_acl_install()
{	
		global $global;

       

        $acl = new SahanaACL(NULL);


        $res = shn_acl_add_module("hr","Hospital Registry");
		
        //create the edit group
        $res=shn_acl_add_action_group("hr","edit","edit group");
        
        //add the add hospitals under the above group
        $res=shn_acl_add_action("hr","add","shn_hr_add_hosp","Add Hospital Funtion");
        
        //add admin to the permission for the add group
        $res=shn_acl_add_perms_action_group_role("admin","hr","add");
        
        $q="insert into config values('hr','acl_base','installed')";
        $res= $global['db']->Execute($q);
 		print "The ACL has been installed";   	
}
?>


More information about the Sahana_proj mailing list