[Sahana_proj] FW: acl help

de Lanerolle, Trishan R. Trishan.deLanerolle at trincoll.edu
Wed Nov 29 10:38:07 EST 2006


FYI:

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

-----Original Message-----
From: Damon, Jonathan B. (2007) 
Sent: Wednesday, November 29, 2006 9:59 AM
To: bdao at wesleyan.edu; de Lanerolle, Trishan R.
Subject: acl help

a couple problems, you create a new action group called edit, but when
you add your function you add it to a group called "add".  Another thing
is that the acl in sahana does not grant permission to admin, but can
deny permission to guests and users.  here is an example, 

    $res=shn_acl_add_module("vm","volunteer management");
    
    $res=shn_acl_add_action_group("vm","deny_admin","Administrative
Action Group");

 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_vol_assign","Assig
n Volunteers to Projects");
    $res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_type_cr","Edit
Skill Sets");
 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_type_form","Edit
Skill Sets");
 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_vol_display","Disp
lay all Volunteers");
    $res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_proj_add","Add
a new Project");
 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_proj_display","Dis
play all Projects");
 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_proj_report","Work
Summary Reports");
 
$res=shn_acl_add_action("vm","deny_admin","shn_vm_adm_type_form","Edit
Skill Types");

    $res=shn_acl_add_perms_action_group_role('guest','vm','deny_admin');
    $res=shn_acl_add_perms_action_group_role('user','vm','deny_admin');

this means that only an admin can use those functions.  Any other
functions not included in this file will be allowed for all users.

If you have any other questions or are not able to fix it then send me
an email explaining what you are trying to do, exactly.

Hope this helps,
Jon



More information about the Sahana_proj mailing list