This topic is locked

How would I create a new user group perm?

8/14/2007 6:07:57 PM
PHPRunner General questions
F
fsteves author

I have been trying to figure out where to add something like this:

{if $allow_transfer}

// Show Transfer Button

{/if}



...
I know that in commonfunctions, I can add the following:

if($table=="evac_info_prereg" && $sUserGroup=="User")

return "AESPT";


and further down...

// check user group permissions

$strPerm = GetUserPermissions();

if($strAction=="Add" && !(strpos($strPerm, "A")===false) ||

$strAction=="Edit" && !(strpos($strPerm, "E")===false) ||

$strAction=="Delete" && !(strpos($strPerm, "D")===false) ||

$strAction=="Search" && !(strpos($strPerm, "S")===false) ||

$strAction=="Export" && !(strpos($strPerm, "P")===false) ||

$strAction=="Transfer" && !(strpos($strPerm, "T")===false) )


I just do not know where to assign the variable $allow_transfer, and have it make sense in the whole system.

J
Jane 8/15/2007

Hi,
to assign value open generated ..._list.php file, find this line:

$smarty->assign("allow_delete",CheckSecurity(@$SESSION["".$strTableName."_OwnerID"],"Delete"));



and add your code just after.