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


PHP Permissions::canPreviewPageAsUser方法代码示例

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


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

示例1:

     break;
 case 'edit_permissions':
     if (PERMISSIONS_MODEL == 'simple') {
         $toolSection = 'collection_permissions_simple';
     } else {
         $toolSection = "permission/lists/collection";
     }
     $canViewPane = $cp->canEditPagePermissions();
     break;
 case 'set_advanced_permissions':
     $toolSection = "permission/details/collection";
     $canViewPane = $cp->canEditPagePermissions();
     break;
 case 'preview_page_as_user':
     $toolSection = "collection_preview_as_user";
     $canViewPane = $cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced';
     break;
 case 'view_timed_permission_list':
     $toolSection = "collection_timed_permission_list";
     $canViewPane = $cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced';
     break;
 case 'mcd':
     $toolSection = "collection_mcd";
     $canViewPane = $cp->canMoveOrCopyPage();
     $divID = "ccm-collection-mcd";
     break;
 case 'delete':
     $toolSection = "collection_delete";
     $canViewPane = $cp->canDeletePage();
     break;
 case 'set_theme':
开发者ID:Zyqsempai,项目名称:amanet,代码行数:31,代码来源:edit_collection_popup.php

示例2: Permissions

$c = Page::getByID($_GET['cID'], 'RECENT');
$cp = new Permissions($c);
$canViewPane = false;
$additionalArgs = array();
switch ($_GET['ctask']) {
    case 'edit_permissions':
        $toolSection = "permission/lists/collection";
        $canViewPane = $cp->canEditPagePermissions();
        break;
    case 'set_advanced_permissions':
        $toolSection = "permission/details/collection";
        $canViewPane = $cp->canEditPagePermissions();
        break;
    case 'preview_page_as_user':
        $toolSection = "collection_preview_as_user";
        $canViewPane = $cp->canPreviewPageAsUser() && Config::get('concrete.permissions.model') == 'advanced';
        break;
    case 'view_timed_permission_list':
        $toolSection = "collection_timed_permission_list";
        $canViewPane = $cp->canPreviewPageAsUser() && Config::get('concrete.permissions.model') == 'advanced';
        break;
}
if (!isset($divID)) {
    $divID = 'ccm-edit-collection';
}
if (!$canViewPane) {
    die(t("Access Denied."));
}
?>

<div id="<?php 
开发者ID:seebaermichi,项目名称:concrete5,代码行数:31,代码来源:edit_collection_popup.php

示例3: die

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$c = Page::getByID($_REQUEST['cID'], 'RECENT');
//,"ACTIVE"
$cp = new Permissions($c);
if ($cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced') {
    $v = View::getInstance();
    $v->disableEditing();
    $v->disableLinks();
    $req = Request::get();
    $req->setCustomRequestUser(false);
    if (isset($_REQUEST['customUser'])) {
        $ui = UserInfo::getByUserName($_REQUEST['customUser']);
        if (is_object($ui)) {
            $req->setCustomRequestUser($ui->getUserObject());
        }
    }
    $dt = Loader::helper('form/date_time');
    $date = $dt->translate('onDate', $_REQUEST);
    $req->setCustomRequestDateTime($date);
    $req = Request::get();
    $cp = new Permissions($c);
    if ($cp->canRead()) {
        $v->render($c);
    } else {
        print t('Unable to view page.');
    }
}
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:29,代码来源:preview_as_user.php

示例4: t

}
if ($cp->canViewPageVersions()) {
    ?>
            <li>
                <a href="#" data-launch-sub-panel-url="<?php 
    echo URL::to('/ccm/system/panels/page/versions');
    ?>
">
                    <?php 
    echo t('Versions');
    ?>
                </a>
            </li>
        <?php 
}
if ($cp->canPreviewPageAsUser() && Config::get('concrete.permissions_model') == 'advanced') {
    ?>
            <li>
                <a href="#" data-launch-sub-panel-url="<?php 
    echo URL::to('/ccm/system/panels/page/preview_as_user');
    ?>
"
                   data-launch-panel-detail="preview-page"
                   data-panel-detail-url="<?php 
    echo URL::to('/ccm/system/panels/page/preview_as_user/preview');
    ?>
"
                   data-panel-transition="fade">
                    <?php 
    echo t('View as User');
    ?>
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:31,代码来源:page.php


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