Actually use definition permissions

This commit is contained in:
Nathan Gray 2011-02-03 16:42:03 +00:00
parent ae07ff2331
commit ae035df727
2 changed files with 4 additions and 4 deletions

View File

@ -29,13 +29,13 @@ class importexport_definitions_bo {
*/
private $definitions;
public function __construct($_query=false)
public function __construct($_query=false, $ignore_acl = false)
{
$this->so_sql = new so_sql(self::_appname, self::_defintion_table );
if ($_query) {
$definitions = $this->so_sql->search($_query, true);
$definitions = $this->so_sql->search($_query, false);
foreach ((array)$definitions as $definition) {
$this->definitions[] = $definition['definition_id'];
if(self::is_permitted($definition) || $ignore_acl) $this->definitions[] = $definition['definition_id'];
}
}
}

View File

@ -77,7 +77,7 @@ class importexport_definitions_ui
*/
function index($content = null,$msg='')
{
$bodefinitions = new importexport_definitions_bo(array('name' => '*'));
$bodefinitions = new importexport_definitions_bo(array('name' => '*'), true);
if (is_array($content))
{
if (isset($content['delete']))