]> git.andy128k.dev Git - ipf.git/commitdiff
admin: 'hidden' option
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 6 Oct 2013 16:41:20 +0000 (19:41 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 6 Oct 2013 16:41:20 +0000 (19:41 +0300)
ipf/admin/model.php
ipf/admin/views.php

index e285f2e233aac8bc32aba2603da21ac51a90054e..f2e1d3e68665b6335e93e4141c2263e1f41c6929 100644 (file)
@@ -306,6 +306,7 @@ class IPF_Admin_Model
     var $model = null;
     var $inlineInstances = array();
     var $perPage = 50;
+    public $hidden = false;
 
     public function __construct($modelName)
     {
index 8c985e87d52e47b861d1000d5259b7b6cab0bffc..b47407070bbfe6ef19e8d4e340d7f31980fd99e0 100644 (file)
@@ -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'));