| @@ -12,14 +12,19 @@ | ||
| 12 | 12 | |
| 13 | 13 | // import Joomla view library |
| 14 | 14 | jimport('joomla.application.component.view'); |
| 15 | 15 | |
| 16 | -class VikBookingViewTariffs extends JViewVikBooking { | |
| 17 | - | |
| 18 | - function display($tpl = null) { | |
| 16 | +class VikBookingViewTariffs extends JViewVikBooking | |
| 17 | +{ | |
| 18 | + public function display($tpl = null) | |
| 19 | + { | |
| 19 | 20 | // Set the toolbar |
| 20 | 21 | $this->addToolBar(); |
| 21 | 22 | |
| 23 | + if (!JFactory::getUser()->authorise('core.vbo.pricing', 'com_vikbooking')) { | |
| 24 | + VBOHttpDocument::getInstance()->close(403, JText::translate('JERROR_ALERTNOAUTHOR')); | |
| 25 | + } | |
| 26 | + | |
| 22 | 27 | $cid = VikRequest::getVar('cid', array(0)); |
| 23 | 28 | $aid = $cid[0]; |
| 24 | 29 | |
| 25 | 30 | $dbo = JFactory::getDBO(); |
| @@ -121,9 +126,10 @@ | ||
| 121 | 126 | |
| 122 | 127 | /** |
| 123 | 128 | * Sets the toolbar |
| 124 | 129 | */ |
| 125 | - protected function addToolBar() { | |
| 130 | + protected function addToolBar() | |
| 131 | + { | |
| 126 | 132 | JToolBarHelper::title(JText::translate('VBMAINTARIFFETITLE'), 'vikbooking'); |
| 127 | 133 | JToolBarHelper::save('cancel', JText::translate('VBMAINTARIFFEBACK')); |
| 128 | 134 | JToolBarHelper::spacer(); |
| 129 | 135 | if (JFactory::getUser()->authorise('core.delete', 'com_vikbooking')) { |
| @@ -131,6 +137,5 @@ | ||
| 131 | 137 | JToolBarHelper::spacer(); |
| 132 | 138 | JToolBarHelper::spacer(); |
| 133 | 139 | } |
| 134 | 140 | } |
| 135 | - | |
| 136 | 141 | } |