From: Andrey Kutejko Date: Sun, 6 Oct 2013 16:41:20 +0000 (+0300) Subject: admin: 'hidden' option X-Git-Tag: 0.5~19 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=64f9e8335684af338d5d0a1513e886c55d431b35;p=ipf.git admin: 'hidden' option --- 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'));