function testGlobalChecksOnly() { $builder = new Perms_Builder(); $perms = $builder->withDefinitions(array(array('name' => 'tiki_p_search', 'type' => 'tiki', 'scope' => 'global', 'admin' => false), array('name' => 'tiki_p_edit', 'type' => 'wiki', 'scope' => 'object', 'admin' => false)))->build(); $expect = $this->getExpect(false, array(), array('search')); $this->assertEquals($expect, $perms); }
$smarty->assign('filename', $aFileInfos['name']); } $smarty->assign('email_token', $detailtoken['email']); $txt = $smarty->fetch('mail/user_watch_token.tpl'); $mail->setHTML($txt); $mailsent = $mail->send(array($not['email'])); } } } if (empty($notificationPage)) { $notificationPage = preg_replace('/[\\?&]TOKEN=' . $token . '/', '', $_SERVER['REQUEST_URI']); } // Log each token access $logslib->add_log('token', $detailtoken['email'] . ' ' . tra('has accessed the following shared content:') . ' ' . $notificationPage); } else { // Error Token expired $token_error = tra('Your access to this page has expired'); } } $allperms = $userlib->get_enabled_permissions(); Perms_Context::setPermissionList($allperms); $builder = new Perms_Builder(); $perms = $builder->withCategories($prefs['feature_categories'] == 'y')->withDefinitions($allperms)->build(); Perms::set($perms); $_permissionContext = new Perms_Context($user, false); if ($groupList) { $_permissionContext->overrideGroups($groupList); } $_permissionContext->activate(true); unset($allperms); unset($tokenParams);