当前位置: 首页>>代码示例>>PHP>>正文


PHP Security::getObjectsWithPermission方法代码示例

本文整理汇总了PHP中Security::getObjectsWithPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP Security::getObjectsWithPermission方法的具体用法?PHP Security::getObjectsWithPermission怎么用?PHP Security::getObjectsWithPermission使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Security的用法示例。


在下文中一共展示了Security::getObjectsWithPermission方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAdminUI

 public function processAdminUI()
 {
     $network = Network::processSelectUI('Statistics');
     if ($network) {
         $this->report_selected_networks[$network->getId()] = $network;
     } else {
         $networks = Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_VIEW_STATISTICS'));
         foreach ($networks as $network) {
             $this->report_selected_networks[$network->getId()] = $network;
         }
     }
     $this->processDateRangeUI();
     $this->processSelectedNodesUI();
     $this->processDistinguishUsersByUI();
     $this->processSelectedUsersUI();
     $this->processSelectedReportsUI();
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:17,代码来源:Statistics.php

示例2: hookMenu

 /** Menu hook function */
 public static function hookMenu()
 {
     $items = array();
     if ($networks = Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_EDIT_NETWORK_CONFIG'))) {
         foreach ($networks as $networkId => $network) {
             $items[] = array('path' => 'network/network_' . $networkId . 'edit', 'title' => sprintf(_("Edit %s"), $network->getName()), 'url' => BASE_URL_PATH . htmlspecialchars("admin/generic_object_admin.php?object_class=Network&action=edit&object_id={$networkId}"));
         }
     }
     if (Security::hasPermission(Permission::P('SERVER_PERM_ADD_NEW_NETWORK'), Server::getServer())) {
         $items[] = array('path' => 'network/network_add_new', 'title' => sprintf(_("Add a new network on this server")), 'url' => BASE_URL_PATH . htmlspecialchars("admin/generic_object_admin.php?object_class=Network&action=new_ui"));
     }
     $items[] = array('path' => 'network', 'title' => _('Network administration'), 'type' => MENU_ITEM_GROUPING);
     return $items;
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:15,代码来源:Network.php

示例3: hookMenu

 /** Menu hook function */
 public static function hookMenu()
 {
     $items = array();
     $network = Network::getCurrentNetwork();
     $server = Server::getServer();
     if (Security::hasAnyPermission(array(array(Permission::P('NETWORK_PERM_VIEW_ONLINE_USERS'), $network)))) {
         $items[] = array('path' => 'users/online_users', 'title' => _("Online Users"), 'url' => BASE_URL_PATH . "admin/online_users.php");
     }
     if (Security::hasPermission(Permission::P('SERVER_PERM_EDIT_SERVER_CONFIG'), $server)) {
         $items[] = array('path' => 'users/import_nocat', 'title' => _("Import NoCat user database"), 'url' => BASE_URL_PATH . "admin/import_user_database.php");
     }
     if (Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_EDIT_ANY_USER'))) {
         $items[] = array('path' => 'users/user_manager', 'title' => _("User manager"), 'url' => BASE_URL_PATH . "admin/user_log.php");
     }
     if (Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_VIEW_STATISTICS'))) {
         $items[] = array('path' => 'users/statistics', 'title' => _("Statistics"), 'url' => BASE_URL_PATH . "admin/stats.php");
     }
     $items[] = array('path' => 'users', 'title' => _('User administration'), 'type' => MENU_ITEM_GROUPING);
     return $items;
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:21,代码来源:User.php

示例4: array

// |                                                                   |
// +-------------------------------------------------------------------+
/**
 * @package    WiFiDogAuthServer
 * @author     Philippe April
 * @copyright  2004-2006 Philippe April
 * @version    Subversion $Id$
 * @link       http://www.wifidog.org/
 */
/**
 * Load common include file
 */
require_once 'admin_common.php';
require_once 'classes/MainUI.php';
require_once 'classes/User.php';
$networks = Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_EDIT_ANY_USER'));
$db = AbstractDb::getObject();
$smarty = SmartyWifidog::getObject();
$total = array();
$total['incoming'] = 0;
$total['outgoing'] = 0;
// Process user ID searchbox
$errmsg = null;
$user = User::processSelectUserUI("user_id_searchbox", $errmsg);
if (!empty($_REQUEST['user_id']) || !empty($user)) {
    header("Location: " . BASE_SSL_PATH . "admin/generic_object_admin.php?object_id={$user->getId()}&object_class=User&action=edit");
    exit;
} else {
    $smarty->assign("error", null);
    $smarty->assign('sort_ids', array('username', 'account_origin', 'reg_date'));
    $smarty->assign('direction_ids', array('asc', 'desc'));
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:31,代码来源:user_log.php

示例5: hookMenu

 /** Menu hook function */
 public static function hookMenu()
 {
     $items = array();
     if (Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_EDIT_ANY_NODE_CONFIG'))) {
         $items[] = array('path' => 'node/node_edit', 'title' => _("Edit nodes"), 'url' => BASE_URL_PATH . htmlspecialchars("admin/generic_object_admin.php?object_class=Node&action=list"));
     } else {
         if ($nodes = Security::getObjectsWithPermission(Permission::P('NODE_PERM_EDIT_CONFIG'))) {
             foreach ($nodes as $nodeId => $node) {
                 $items[] = array('path' => 'node/node_' . $nodeId . 'edit', 'title' => sprintf(_("Edit %s"), $node->getName()), 'url' => BASE_URL_PATH . htmlspecialchars("admin/generic_object_admin.php?object_class=Node&action=edit&object_id={$nodeId}"));
             }
         }
     }
     if (Security::hasPermission(Permission::P('NETWORK_PERM_ADD_NODE'))) {
         $items[] = array('path' => 'node/node_add_new', 'title' => sprintf(_("Add a new node")), 'url' => BASE_URL_PATH . htmlspecialchars("admin/generic_object_admin.php?object_class=Node&action=new_ui"));
     }
     $items[] = array('path' => 'node', 'title' => _('Node administration'), 'type' => MENU_ITEM_GROUPING);
     return $items;
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:19,代码来源:Node.php


注:本文中的Security::getObjectsWithPermission方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。