You are here

public function PanelizerEntityDefault::access_default_panelizer_object in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::access_default_panelizer_object()

Determine if the current user has access to the $panelizer.

Overrides PanelizerEntityInterface::access_default_panelizer_object

File

plugins/entity/PanelizerEntityDefault.class.php, line 1269
Base class for the Panelizer Entity plugin.

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function access_default_panelizer_object($panelizer) {

  // Automatically true for this, regardless of anything else.
  if (user_access('administer panelizer')) {
    return TRUE;
  }
  ctools_include('context');
  return user_access("administer panelizer {$this->entity_type} {$panelizer->panelizer_key} defaults") && ctools_access($panelizer->access, $this
    ->get_contexts($panelizer));
}