Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api4 AJAX endpoint: change required permission to access AJAX API. #16705

Merged
merged 1 commit into from
Mar 8, 2020

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Mar 7, 2020

Overview

As an anonymous user, it's not possible to use the API4 AJAX endpoint.

(I'm working on an extension which implements its own API4 entity that is accessible to anonymous users.)

Before

HTTP request to the ajax api4 endpoint return an Authorization Denied.

After

HTTP request to the ajax api4 endpoint respects the permissions of the entity.

cc @colemanw

@civibot
Copy link

civibot bot commented Mar 7, 2020

(Standard links)

@civibot civibot bot added the master label Mar 7, 2020
@colemanw
Copy link
Member

colemanw commented Mar 8, 2020

Makes sense to me.

@colemanw colemanw merged commit 4d85eda into civicrm:master Mar 8, 2020
@agh1
Copy link
Contributor

agh1 commented May 6, 2020

I'm super late to the game but wouldn't this be access CiviCRM;access AJAX API like

<access_arguments>access CiviCRM;access AJAX API</access_arguments>

Many users will have access CiviCRM but not access AJAX API.

@agh1
Copy link
Contributor

agh1 commented May 6, 2020

I opened a PR in #17241 to make the above change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants