Commit 8c7e87c6 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(management) Fix action validTypes attribute

issue #5135
parent ab19cc61
......@@ -62,7 +62,7 @@ class Action
$this->callable = $callable;
$this->inmenu = $inmenu;
$this->inline = $inline;
$this->validTypes = $validTypes;
$this->validTypes = array_map('strtoupper', $validTypes);
$this->acl = array();
/*
* acl may be of the form:
......@@ -194,7 +194,7 @@ class Action
return '';
}
if (!empty($this->validTypes) && !($entry->isTemplate() && in_array('template', $this->validTypes)) && !in_array($entry->type, $this->validTypes)) {
if (!empty($this->validTypes) && !($entry->isTemplate() && in_array('TEMPLATE', $this->validTypes)) && !in_array($entry->type, $this->validTypes)) {
return '';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment