Beispiel #1
0
 public function isAccessible()
 {
     if ($this->getAclRoleID()) {
         $this->setPermissionLabel(array('subuser_add_listings', 'subuser_manage_listings'));
     }
     return parent::isAccessible();
 }
Beispiel #2
0
 public function isAccessible()
 {
     $passedParametersViaUri = SJB_UrlParamProvider::getParams();
     $userGroupID = $passedParametersViaUri ? array_shift($passedParametersViaUri) : false;
     $this->setPermissionLabel('manage_' . mb_strtolower($userGroupID, 'UTF-8'));
     return parent::isAccessible();
 }
Beispiel #3
0
 public function isAccessible()
 {
     if ($this->getAclRoleID()) {
         $this->setPermissionLabel('subuser_manage_subscription');
     }
     return parent::isAccessible();
 }
Beispiel #4
0
 public function isAccessible()
 {
     $network = SJB_Request::getVar('passed_parameters_via_uri');
     if (empty($network)) {
         $network = SJB_Request::getVar('soc_network');
     }
     switch ($network) {
         case 'facebook':
             $this->setPermissionLabel('set_linkedin_plug-in');
             break;
         case 'linkedin':
             $this->setPermissionLabel('set_facebook_plug-in');
             break;
         case 'twitter':
             $this->setPermissionLabel('set_twitter_plug-in');
             break;
         case 'googleplus':
             $this->setPermissionLabel('set_googleplusplugin');
             break;
         case 'bitly':
             $this->setPermissionLabel('social_media_bitly');
             break;
         default:
             $this->setPermissionLabel(array('set_linkedin_plug-in', 'set_facebook_plug-in', 'set_twitter_plug-in', 'set_googleplusplugin', 'social_media_bitly'));
             break;
     }
     return parent::isAccessible();
 }
Beispiel #5
0
 public function isAccessible()
 {
     if ($this->getAclRoleID()) {
         $this->setPermissionLabel(array('manage_users', 'manage_products'));
     }
     return parent::isAccessible();
 }
Beispiel #6
0
 public function isAccessible()
 {
     if ($this->getAclRoleID()) {
         $this->setPermissionLabel('manage_payment_gateways');
     }
     return parent::isAccessible();
 }
Beispiel #7
0
 public function isAccessible()
 {
     $listingTypeId = SJB_Request::getVar('listing_type_id', null);
     $listingType = !in_array($listingTypeId, array('resume', 'job')) ? "{$listingTypeId}_listings" : $listingTypeId . 's';
     $this->setPermissionLabel('manage_' . strtolower($listingType));
     return parent::isAccessible();
 }
Beispiel #8
0
 public function isAccessible()
 {
     $userSid = SJB_Request::getVar('user_sid', null);
     $userGroupID = SJB_UserGroupManager::getUserGroupIDByUserSID($userSid);
     $this->setPermissionLabel('manage_' . strtolower($userGroupID));
     return parent::isAccessible();
 }
Beispiel #9
0
 public function isAccessible()
 {
     $cu = SJB_UserManager::getCurrentUser();
     if (!empty($cu) && $cu->isSubuser()) {
         return false;
     } else {
         return parent::isAccessible();
     }
 }
Beispiel #10
0
 public function isAccessible()
 {
     $listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
     if ($listingTypeID) {
         $permissionLabel = 'view_' . strtolower($listingTypeID) . '_search_results';
         $this->setPermissionLabel($permissionLabel);
     }
     return parent::isAccessible() && SJB_System::isUserAccessThisPage();
 }
Beispiel #11
0
 public function isAccessible()
 {
     $this->searchID = SJB_Request::getVar('searchId', '');
     $this->criteriaSaver = new SJB_ListingCriteriaSaver($this->searchID);
     $this->criteriaData = $this->criteriaSaver->getCriteria();
     $this->listingTypeID = SJB_GuestAlertManager::getListingTypeIDFromCriteria($this->criteriaData);
     $this->setPermissionLabel('use_' . $this->listingTypeID . '_alerts');
     return parent::isAccessible();
 }
Beispiel #12
0
 public function isAccessible()
 {
     $listingId = SJB_Request::getVar('listing_id', null);
     $listingInfo = SJB_ListingManager::getListingInfoBySID($listingId);
     $listingTypeId = SJB_ListingTypeManager::getListingTypeIDBySID($listingInfo['listing_type_sid']);
     $listingType = !in_array($listingTypeId, array('Resume', 'Job')) ? "{$listingTypeId}_listings" : $listingTypeId . 's';
     $this->setPermissionLabel('manage_' . strtolower($listingType));
     return parent::isAccessible();
 }
Beispiel #13
0
 public function isAccessible()
 {
     $plugin = SJB_Request::getVar('plugin', null);
     switch ($plugin) {
         case 'PhpBBBridgePlugin':
             $this->setPermissionLabel('set_phpbb_plug-in');
             break;
         case 'LinkedinSocialPlugin':
             $this->setPermissionLabel('set_linkedin_plug-in');
             break;
         case 'FacebookSocialPlugin':
             $this->setPermissionLabel('set_facebook_plug-in');
             break;
         case 'WordPressBridgePlugin':
             $this->setPermissionLabel('set_wordpress_plug-in');
             break;
         case 'TwitterIntegrationPlugin':
             $this->setPermissionLabel('set_twitter_plug-in');
             break;
         case 'ShareThisPlugin':
             $this->setPermissionLabel('set_sharethisplugin');
             break;
         case 'CaptchaPlugin':
             $this->setPermissionLabel('set_captchaplugin');
             break;
         case 'IndeedPlugin':
             $this->setPermissionLabel('set_indeedplugin');
             break;
         case 'JujuPlugin':
             $this->setPermissionLabel('set_jujuplugin');
             break;
         case 'SimplyHiredPlugin':
             $this->setPermissionLabel('set_simplyhiredplugin');
             break;
         case 'GooglePlusSocialPlugin':
             $this->setPermissionLabel('set_googleplusplugin');
             break;
         case 'GoogleAnalyticsPlugin':
             $this->setPermissionLabel('set_googleanalyticsplugin');
             break;
         case 'BeyondPlugin':
             $this->setPermissionLabel('set_beyondplugin');
             break;
         default:
             $this->setPermissionLabel(array('manage_plug-ins', 'set_phpbb_plug-in', 'set_linkedin_plug-in', 'set_facebook_plug-in', 'set_wordpress_plug-in', 'set_twitter_plug-in', 'set_sharethisplugin', 'set_captchaplugin', 'set_indeedplugin', 'set_jujuplugin', 'set_simplyhiredplugin', 'set_googleplugin', 'set_googleplusplugin', 'set_googleanalyticsplugin', 'set_beyondplugin'));
             break;
     }
     return parent::isAccessible();
 }
Beispiel #14
0
 public function isAccessible()
 {
     $listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
     if ($listingTypeID) {
         $permissionLabel = 'view_' . strtolower($listingTypeID) . '_details';
         $this->setPermissionLabel($permissionLabel);
         $allow = parent::isAccessible() && SJB_System::isUserAccessThisPage();
         $listingID = SJB_Request::getVar('listing_id', false);
         $passedParametersViaUri = SJB_Request::getVar('passed_parameters_via_uri', false);
         if (!$listingID && $passedParametersViaUri) {
             $passedParametersViaUri = SJB_UrlParamProvider::getParams();
             if (isset($passedParametersViaUri[0])) {
                 $listingID = $passedParametersViaUri[0];
             }
         }
         if (SJB_UserManager::isUserLoggedIn()) {
             $currentUser = SJB_UserManager::getCurrentUser();
             if (!$allow && $listingID) {
                 $pageID = SJB_PageManager::getPageParentURI(SJB_Navigator::getURI(), SJB_System::getSystemSettings('SYSTEM_ACCESS_TYPE'), false);
                 $pageHasBeenVisited = SJB_ContractManager::isPageViewed($currentUser->getSID(), $pageID, $listingID);
                 if ($pageHasBeenVisited || strpos($pageID, 'print') !== false) {
                     $allow = true;
                 }
             }
             if (!$allow && 'Resume' == $listingTypeID && $listingID) {
                 // if view resume not allowed by ACL, check applications table
                 // for current resume ID, applied for one of current user jobs
                 // if present in applications - allow current user to view resume
                 // check for all jobs of current user
                 $cuJobs = SJB_ListingManager::getListingsByUserSID($currentUser->getSID());
                 $listingSids = array();
                 foreach ($cuJobs as $job) {
                     $listingSids[] = $job->getSID();
                 }
                 if (!empty($listingSids)) {
                     $result = SJB_DB::query('SELECT * FROM `applications` WHERE `resume` = ?n AND `listing_id` IN (?l) LIMIT 1', $listingID, $listingSids);
                     if (!empty($result)) {
                         $allow = true;
                     }
                 }
             }
         }
         return $allow;
     }
     return parent::isAccessible() && SJB_System::isUserAccessThisPage();
 }
Beispiel #15
0
 /**
  * @return bool
  */
 public function isAccessible()
 {
     $listingTypeID = SJB_Array::get($this->params, 'listing_type_id');
     if ($listingTypeID) {
         $permissionLabel = 'open_' . strtolower($listingTypeID) . '_search_form';
         $this->setPermissionLabel($permissionLabel);
         $form_template = SJB_Array::get($this->params, 'form_template');
         if ($listingTypeID === 'Job') {
             if (!parent::isAccessible() && !isset($form_template) && !SJB_System::isUserAccessThisPage()) {
                 return false;
             } elseif ($form_template == 'quick_search.tpl') {
                 return true;
             }
         }
     }
     return parent::isAccessible() && SJB_System::isUserAccessThisPage();
 }
Beispiel #16
0
 public function isAccessible()
 {
     $browseUrl = SJB_Request::getVar('browseUrl', false);
     if ($browseUrl) {
         $parameters = SJB_BrowseDBManager::getBrowseParametersByUri($browseUrl);
         $this->parameters = array_merge($_REQUEST, unserialize($parameters));
     } else {
         $this->parameters = $_REQUEST;
     }
     $listingTypeId = SJB_Request::getVar('listing_type_id', '');
     $browseManager = SJB_ObjectMother::createBrowseManager($listingTypeId, $this->parameters);
     $params = $browseManager->getParams();
     if (empty($params)) {
         return true;
     }
     $this->setPermissionLabel('view_' . strtolower($listingTypeId) . '_search_results');
     return parent::isAccessible();
 }
Beispiel #17
0
 public function isAccessible()
 {
     switch (SJB_Request::getVar('type')) {
         case 'user':
             $userSid = SJB_Request::getVar('role', null);
             $userGroupID = SJB_UserGroupManager::getUserGroupIDByUserSID($userSid);
             SJB_System::setGlobalTemplateVariable('wikiExtraParam', $userGroupID);
             $this->setPermissionLabel('manage_' . strtolower($userGroupID));
             break;
         case 'group':
             $this->setPermissionLabel('manage_user_groups_permissions');
             break;
         case 'product':
             $this->setPermissionLabel('manage_products');
             break;
     }
     return parent::isAccessible();
 }
 public function isAccessible()
 {
     $this->setPermissionLabel('manage_common_listing_fields');
     return parent::isAccessible();
 }
 public function isAccessible()
 {
     $this->setPermissionLabel('edit_form_builder');
     return parent::isAccessible();
 }
 public function isAccessible()
 {
     $this->setPermissionLabel('set_task_scheduler');
     return parent::isAccessible();
 }
Beispiel #21
0
 public function isAccessible()
 {
     $this->setPermissionLabel('manage_languages');
     return parent::isAccessible();
 }
Beispiel #22
0
 public function isAccessible()
 {
     $this->setPermissionLabel('social_media_bitly');
     return parent::isAccessible();
 }
Beispiel #23
0
 public function isAccessible()
 {
     $this->setPermissionLabel('manage_listing_types_and_specific_listing_fields');
     return parent::isAccessible();
 }
Beispiel #24
0
 public function isAccessible()
 {
     $this->setPermissionLabel('set_xml_import');
     return parent::isAccessible();
 }
Beispiel #25
0
 public function isAccessible()
 {
     $this->setPermissionLabel('apply_for_a_job');
     return parent::isAccessible();
 }
 public function isAccessible()
 {
     $this->setPermissionLabel('use_private_messages');
     return parent::isAccessible();
 }
Beispiel #27
0
 public function isAccessible()
 {
     $this->setPermissionLabel('translate_phrases');
     return parent::isAccessible();
 }
Beispiel #28
0
 public function isAccessible()
 {
     $this->setPermissionLabel('edit_user_groups_profile_fields');
     return parent::isAccessible();
 }
Beispiel #29
0
 public function isAccessible()
 {
     $this->setPermissionLabel('edit_templates_and_themes');
     return parent::isAccessible();
 }
Beispiel #30
0
 public function isAccessible()
 {
     $this->setPermissionLabel('general_statistics');
     return parent::isAccessible();
 }