public function testResolveContactWithLink()
 {
     $contacts = Contact::getByName('test testson');
     $content = CampaignItemSummaryListViewColumnAdapter::resolveContactWithLink($contacts[0]);
     $this->assertContains('test testson', $content);
     //Benny dont have access to contact
     Yii::app()->user->userModel = User::getByUsername('benny');
     $content = CampaignItemSummaryListViewColumnAdapter::resolveContactWithLink($contacts[0]);
     $this->assertContains('You cannot see this contact due to limited access', $content);
 }
Пример #2
0
 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);
 }