/**
 * Renders a 403 access denied page for authorize.php.
 */
function authorize_access_denied_page()
{
    backdrop_add_http_header('Status', '403 Forbidden');
    watchdog('access denied', 'authorize.php', NULL, WATCHDOG_WARNING);
    backdrop_set_title('Access denied');
    return t('You are not allowed to access this page.');
}
Beispiel #2
0
 /**
  * @inheritDoc
  */
 public function setHttpHeader($name, $value)
 {
     backdrop_add_http_header($name, $value);
 }
Beispiel #3
0
/**
 * Renders a 403 access denied page for update.php.
 *
 * @return
 *   Rendered HTML warning with 403 status.
 */
function update_access_denied_page()
{
    backdrop_add_http_header('Status', '403 Forbidden');
    watchdog('access denied', 'update.php', NULL, WATCHDOG_WARNING);
    backdrop_set_title('Access denied');
    return '<p>Access denied. You are not authorized to access this page. Log in using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit <code>settings.php</code> to bypass this access check. To do this:</p>
<ol>
 <li>With a text editor find the settings.php file on your system and open it.</li>
 <li>There is a line inside your settings.php file that says <code>$settings[&#39;update_free_access&#39;] = FALSE;</code>. Change it to <code>$settings[&#39;update_free_access&#39;] = TRUE;</code>.</li>
 <li>As soon as the update.php script is done, you must change the settings.php file back to its original form with <code>$settings[&#39;update_free_access&#39;] = FALSE;</code>.</li>
 <li>To avoid having this problem in the future, remember to log in to your website using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation) before you backup your database at the beginning of the update process.</li>
</ol>';
}