From 64f9e8335684af338d5d0a1513e886c55d431b35 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 6 Oct 2013 19:41:20 +0300 Subject: [PATCH] admin: 'hidden' option --- ipf/admin/model.php | 1 + ipf/admin/views.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ipf/admin/model.php b/ipf/admin/model.php index e285f2e..f2e1d3e 100644 --- a/ipf/admin/model.php +++ b/ipf/admin/model.php @@ -306,6 +306,7 @@ class IPF_Admin_Model var $model = null; var $inlineInstances = array(); var $perPage = 50; + public $hidden = false; public function __construct($modelName) { diff --git a/ipf/admin/views.php b/ipf/admin/views.php index 8c985e8..b474070 100644 --- a/ipf/admin/views.php +++ b/ipf/admin/views.php @@ -13,7 +13,7 @@ function IPF_Admin_Views_Index($request, $match) $models_found = false; foreach($app->modelList() as $m){ $ma = IPF_Admin_Model::getModelAdmin($m); - if ($ma!==null){ + if ($ma!==null && !$ma->hidden){ $perms = $ma->getPerms($request); if (array_search('view', $perms)!==false){ $user_perms = IPF_Auth_App::checkPermissions($request, $app, $m, array('view')); -- 2.49.0