access rules

[color="#0000FF"]

Is it possible?

In Controller include class function accessRules:[/color]




public function accessRules(){


include ("test.php");


}



class permission test.php:





// if condition is true then:

if $value = true 

{

array('allow', 

                'actions'=>array('update'),

);

}




[color="#0000FF"]call from the control class[/color] [color="#FF0000"]test.php[/color]?




// controller

public function accessRules(){

  return require("test.php");

}


// test.php

$rules = array();

if ($value = true) {

  $rules[] = array('allow', 'actions'=>array('update'));

}


return $rules;



:)

[color="#0000FF"]Excellent! Thank you.[/color]