Пример #1
0
 protected function allowAdd($data = array())
 {
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $folderId = JArrayHelper::getValue($data, 'folder', $app->input->getInt('filter_folder_id'), 'int');
     $allow = null;
     if ($folderId) {
         // If Folder
         $allow = $user->authorise('core.create', $this->option . '.folder.' . $folderId);
     }
     if ($allow === null) {
         // Component Permissions
         return parent::allowAdd($data);
     } else {
         return $allow;
     }
 }