You are here

function live_css_access in Live CSS 7.2

Implements live_css_access().

Restrict users from accessing menu callback css/save with no POST data or if they don't have permission.

1 string reference to 'live_css_access'
live_css_menu in ./live_css.module
Implements hook_menu().

File

./live_css.module, line 67
Allows editing and a live view of all changes in real-time in the browser.

Code

function live_css_access() {
  if (!isset($_POST['href']) || !isset($_POST['css']) || is_null($_POST)) {
    return drupal_access_denied();
  }
  return user_access('edit css limited') || user_access('edit css') || user_access('edit css admin') || drupal_access_denied();
}