Skip to content
Snippets Groups Projects
Commit 7e67fdb7 authored by colemanw's avatar colemanw
Browse files

APIv4 - filter getActions results based on user permissions

parent 26815ac4
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ class GetActions extends BasicGetAction {
try {
if (!isset($this->_actions[$actionName]) && (!$this->_actionsToGet || in_array($actionName, $this->_actionsToGet))) {
$action = \Civi\API\Request::create($this->getEntityName(), $actionName, ['version' => 4]);
if (is_object($action)) {
if (is_object($action) && (!$this->checkPermissions || $action->isAuthorized())) {
$this->_actions[$actionName] = ['name' => $actionName];
if ($this->_isFieldSelected('description', 'comment', 'see')) {
$vars = ['entity' => $this->getEntityName(), 'action' => $actionName];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment