public function PanelizerEntityDefault::access_default_panelizer_object in Panelizer 7.3
Same name and namespace in other branches
- 7.2 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 2820 - 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));
}