Skip to content
Snippets Groups Projects
Unverified Commit 10ba4c71 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #17540 from colemanw/getActionsPerm

APIv4 - filter getActions results based on user permissions
parents c02d2eb2 7e67fdb7
Branches
Tags
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