/** * Validate all URLS in any attachments * (See AttachmentsUpdate::reinstall_permissions() in update.php for details ) */ public function reinstall_permissions() { // Access check. if (!JFactory::getUser()->authorise('core.admin', 'com_attachments')) { return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 159)'); } require_once JPATH_ADMINISTRATOR . '/components/com_attachments/update.php'; $msg = AttachmentsUpdate::installAttachmentsPermissions(); if (JRequest::getBool('close')) { $this->enqueueSystemMessage($msg); // Close this window and refesh the parent window AttachmentsJavascript::closeModal(); } else { $this->setRedirect('index.php?option=' . $this->option, $msg); } }
/** * Install the default ACL/permissions rules for the new attachments privileges in the root rule */ protected function installPermissions() { global $attachments_install_verbose; /** Load the Attachments defines */ require_once JPATH_ADMINISTRATOR . '/components/com_attachments/update.php'; AttachmentsUpdate::installAttachmentsPermissions($attachments_install_verbose); }