private function forwardToDefault()
 {
     global $ilCtrl, $lng;
     $is_vendor = ilPaymentVendors::_isVendor($this->user_obj->getId());
     $has_stat_perm = ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId());
     $has_obj_perm = ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId());
     $has_coup_perm = ilPaymentTrustees::_hasCouponsPermission($this->user_obj->getId());
     if ($is_vendor || $has_stat_perm) {
         $ilCtrl->redirectByClass('ilpaymentstatisticgui');
     } else {
         if ($has_obj_perm) {
             $ilCtrl->redirectByClass('ilpaymentobjectgui');
         } else {
             if ($has_coup_perm) {
                 $ilCtrl->redirectByClass('ilpaymentcoupongui');
             }
         }
     }
     ilUtil::sendInfo($lng->txt("no_permission"));
     return false;
 }
Пример #2
0
 protected function buildSubTabs()
 {
     global $ilUser, $ilTabs;
     switch ($this->getSection()) {
         case 6:
             if (ilPaymentVendors::_isVendor($ilUser->getId()) || ilPaymentTrustees::_hasStatisticPermission($ilUser->getId())) {
                 $ilTabs->addSubTabTarget('bookings', $this->ctrl->getLinkTargetByClass('ilpaymentstatisticgui'), '', '', '');
             }
             if (ilPaymentVendors::_isVendor($ilUser->getId()) || ilPaymentTrustees::_hasObjectPermission($ilUser->getId())) {
                 $ilTabs->addSubTabTarget('paya_object', $this->ctrl->getLinkTargetByClass('ilpaymentobjectgui'), '', '', '');
             }
             if (ilPaymentVendors::_isVendor($ilUser->getId())) {
                 $ilTabs->addSubTabTarget('paya_trustees', $this->ctrl->getLinkTargetByClass('ilpaymenttrusteegui'), '', '', '');
             }
             if (!(bool) $this->oGeneralSettings->get('hide_coupons')) {
                 if (ilPaymentVendors::_isVendor($ilUser->getId()) || ilPaymentTrustees::_hasCouponsPermission($ilUser->getId())) {
                     $ilTabs->addSubTabTarget('paya_coupons_coupons', $this->ctrl->getLinkTargetByClass('ilpaymentcoupongui'), '', '', '');
                 }
             }
             break;
         default:
             break;
     }
 }
Пример #3
0
 public static function _hasAccess($a_usr_id)
 {
     return ilPaymentTrustees::_hasStatisticPermission($a_usr_id) or ilPaymentTrustees::_hasObjectPermission($a_usr_id) or ilPaymentTrustees::_hasCouponsPermission($a_usr_id);
 }