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


PHP ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel方法代码示例

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


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

示例1: resolveHtmlByEmailTemplateModel

 /**
  * Resolve html for a builder template provided the model itself.
  * @param EmailTemplate $emailTemplate
  * @param bool $renderForCanvas
  * @param OwnedSecurableItem $attachedMergeTagModel
  * @return bool|null|string
  */
 public static function resolveHtmlByEmailTemplateModel(EmailTemplate $emailTemplate, $renderForCanvas = false, OwnedSecurableItem $attachedMergeTagModel = null)
 {
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($emailTemplate);
     $serializedData = $emailTemplate->serializedData;
     $resolvedHtml = static::resolveHtmlBySerializedData($serializedData, $renderForCanvas, $attachedMergeTagModel, $emailTemplate->type, $emailTemplate->language);
     return $resolvedHtml;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:EmailTemplateSerializedDataToHtmlUtil.php

示例2: resolveHtmlByEmailTemplateModel

 /**
  * Resolve html for a builder template provided the model itself.
  * @param EmailTemplate $emailTemplate
  * @param bool $renderForCanvas
  * @return bool|null|string
  */
 public static function resolveHtmlByEmailTemplateModel(EmailTemplate $emailTemplate, $renderForCanvas = false)
 {
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($emailTemplate);
     $serializedData = $emailTemplate->serializedData;
     $resolvedHtml = static::resolveHtmlBySerializedData($serializedData, $renderForCanvas);
     return $resolvedHtml;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:13,代码来源:EmailTemplateSerializedDataToHtmlUtil.php

示例3: actionDetails

 public function actionDetails($id, $redirectUrl = null)
 {
     $emailMessage = EmailMessage::getById(intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($emailMessage);
     $detailsView = new EmailMessageEditAndDetailsView('Details', $this->getId(), $this->getModule()->getId(), $emailMessage);
     $view = new EmailMessagesPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $detailsView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:8,代码来源:DefaultController.php

示例4: actionDetails

 public function actionDetails($id)
 {
     $animal = static::getModelAndCatchNotFoundAndDisplayError('Animal', intval($id));
     $breadCrumbView = StickySearchUtil::resolveBreadCrumbViewForDetailsControllerAction($this, 'AnimalsSearchView', $animal);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($animal);
     AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_VIEWED, array(strval($animal), 'AnimalsModule'), $animal);
     $titleBarAndEditView = $this->makeEditAndDetailsView($animal, 'Details');
     $view = new AnimalsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $titleBarAndEditView));
     echo $view->render();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:10,代码来源:DefaultController.php

示例5: actionDetails

 public function actionDetails($id)
 {
     $conversation = static::getModelAndCatchNotFoundAndDisplayError('Conversation', intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($conversation);
     AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_VIEWED, array(strval($conversation), 'ConversationsModule'), $conversation);
     ConversationsUtil::markUserHasReadLatest($conversation, Yii::app()->user->userModel);
     $detailsView = new ConversationDetailsView($this->getId(), $this->getModule()->getId(), $conversation);
     $conversationsMashableInboxUrl = Yii::app()->createUrl('mashableInbox/default/list', array('modelClassName' => 'Conversation'));
     $breadcrumbLinks = array(Zurmo::t('ConversationsModule', 'Conversations') => $conversationsMashableInboxUrl, StringUtil::getChoppedStringContent(strval($conversation), 25));
     $view = new ConversationsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $detailsView, $breadcrumbLinks, 'ConversationBreadCrumbView'));
     echo $view->render();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:12,代码来源:DefaultController.php

示例6: actionDetails

 public function actionDetails($id, $runReport = false)
 {
     $savedReport = SavedReport::getById((int) $id);
     ControllerSecurityUtil::resolveCanCurrentUserAccessModule($savedReport->moduleClassName);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($savedReport, true);
     $report = SavedReportToReportAdapter::makeReportBySavedReport($savedReport);
     $portlet = Portlet::getById(intval($_GET['portletId']));
     $portlet->params = array('controllerId' => 'default', 'relationModuleId' => $this->getModule()->getId(), 'relationModel' => $report, 'redirectUrl' => Yii::app()->request->getRequestUri(), 'dataProvider' => $this->getDataProvider($report, $report->getId(), (bool) $runReport));
     $portletView = $portlet->getView();
     if (!RightsUtil::canUserAccessModule($portletView::getModuleClassName(), Yii::app()->user->userModel)) {
         $messageView = new AccessFailureView();
         $view = new AccessFailurePageView($messageView);
         echo $view->render();
         Yii::app()->end(0, false);
     }
     $view = new AjaxPageView($portletView);
     echo $view->render();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:18,代码来源:DefaultPortletController.php

示例7: resolveSourceModelByPostSourceDataAttributes

 protected function resolveSourceModelByPostSourceDataAttributes($id, $className, $skipSecurityCheck = false)
 {
     $sourceModel = $className::getById(intval($id));
     if (!$skipSecurityCheck) {
         ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($sourceModel);
     }
     return $sourceModel;
 }
开发者ID:KulturedKitsch,项目名称:kulturedkitsch.info,代码行数:8,代码来源:SendTestEmailUtil.php

示例8: actionCopy

 public function actionCopy($id)
 {
     $copyToOpportunity = new Opportunity();
     $postVariableName = get_class($copyToOpportunity);
     if (!isset($_POST[$postVariableName])) {
         $opportunity = Opportunity::getById((int) $id);
         ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($opportunity);
         ZurmoCopyModelUtil::copy($opportunity, $copyToOpportunity);
     }
     $this->processEdit($copyToOpportunity);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:11,代码来源:DefaultController.php

示例9: resolveSavedReportAndReportByPostData

 protected function resolveSavedReportAndReportByPostData(array $postData, &$savedReport, &$report, $type, $id = null, $isBeingCopied = false)
 {
     if ($id == null) {
         $this->resolveCanCurrentUserAccessReports();
         $savedReport = new SavedReport();
         $report = new Report();
         $report->setType($type);
     } elseif ($isBeingCopied) {
         $savedReport = new SavedReport();
         $oldReport = SavedReport::getById(intval($id));
         ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($oldReport);
         SavedReportCopyModelUtil::copy($oldReport, $savedReport);
         $report = SavedReportToReportAdapter::makeReportBySavedReport($savedReport);
     } else {
         $savedReport = SavedReport::getById(intval($id));
         ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($savedReport);
         $report = SavedReportToReportAdapter::makeReportBySavedReport($savedReport);
     }
     DataToReportUtil::resolveReportByWizardPostData($report, $postData, ReportToWizardFormAdapter::getFormClassNameByType($type));
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:20,代码来源:DefaultController.php

示例10: actionCopy

 /**
  * Copies the product
  * @param int $id
  */
 public function actionCopy($id)
 {
     $copyToProduct = new Product();
     $postVariableName = get_class($copyToProduct);
     if (!isset($_POST[$postVariableName])) {
         $product = Product::getById((int) $id);
         ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($product);
         ProductZurmoCopyModelUtil::copy($product, $copyToProduct);
     }
     $this->processEdit($copyToProduct);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:DefaultController.php

示例11: actionDashboardDetails

 public function actionDashboardDetails($id)
 {
     if (intval($id) > 0) {
         $dashboard = Dashboard::getById(intval($id));
         $layoutId = $dashboard->layoutId;
     } else {
         $dashboard = Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, Yii::app()->user->userModel);
         $layoutId = $dashboard->layoutId;
     }
     $params = array('controllerId' => $this->getId(), 'moduleId' => $this->getModule()->getId());
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($dashboard);
     Portlet::resolvePortletCollectionColumnIndexes($layoutId);
     $homeTitleBarAndDashboardView = new HomeTitleBarAndDashboardView($this->getId(), $this->getModule()->getId(), 'HomeDashboard' . $layoutId, $dashboard, $params);
     $view = new HomePageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $homeTitleBarAndDashboardView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:16,代码来源:DefaultController.php

示例12: actionCopy

 /**
  * @param $id
  * @param null $redirectUrl
  */
 public function actionCopy($id, $redirectUrl = null)
 {
     $modelClassName = $this->getModule()->getPrimaryModelName();
     $copyToActivity = new $modelClassName();
     $postVariableName = get_class($copyToActivity);
     if (!isset($_POST[$postVariableName])) {
         $activity = $modelClassName::getById((int) $id);
         ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($activity);
         ActivityCopyModelUtil::copy($activity, $copyToActivity);
     }
     $this->processEdit($copyToActivity, $redirectUrl);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:16,代码来源:ActivityModelsDefaultController.php

示例13: actionUsersInGroupModalList

 public function actionUsersInGroupModalList($id)
 {
     $model = Group::getById((int) $id);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($model);
     $searchAttributeData = UsersByModelModalListControllerUtil::makeModalSearchAttributeDataByModel($model, 'groups');
     $dataProvider = UsersByModelModalListControllerUtil::makeDataProviderBySearchAttributeData($searchAttributeData);
     Yii::app()->getClientScript()->setToAjaxMode();
     echo UsersByModelModalListControllerUtil::renderList($this, $dataProvider, 'usersInGroupModalList');
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:GroupController.php

示例14: actionGetDepartmentReferenceLaborCostAndBurdonCostToCopy

 public function actionGetDepartmentReferenceLaborCostAndBurdonCostToCopy($id)
 {
     $departmentReference = static::getModelAndCatchNotFoundAndDisplayError('DepartmentReference', intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($departmentReference);
     $data = array();
     if ($departmentReference->laborCost != null) {
         $data['laborCost'] = $departmentReference->laborCost;
     }
     if ($departmentReference->burdonCost != null) {
         $data['burdonCost'] = $departmentReference->burdonCost;
     }
     echo CJSON::encode($data);
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:13,代码来源:DefaultController.php

示例15: actionDrillDownDetails

 public function actionDrillDownDetails($campaignItemId)
 {
     $id = (int) $campaignItemId;
     $campaignItem = CampaignItem::getById($id);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->campaign);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->contact);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->emailMessage);
     echo CampaignItemSummaryListViewColumnAdapter::resolveDrillDownMetricsSummaryContent($campaignItem);
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:9,代码来源:DefaultController.php


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