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

dev/core#1517 - Permission error on event info page for anonymous users #16266

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

jitendrapurohit
Copy link
Contributor

Overview

Fix permission error on event info page.

Before

Giving anonymous "access CiviEvent" in addition to "view event info" cause them to get "API permission check failed for Event/get call; insufficient permission: require access CiviCRM".

image

After

Fixed.

Technical Details

Manage event links should only be loaded for users having edit all events permission.

Comments

Gitlab - https://lab.civicrm.org/dev/core/issues/1517

@civibot
Copy link

civibot bot commented Jan 10, 2020

(Standard links)

@civibot civibot bot added the master label Jan 10, 2020
@eileenmcnaughton
Copy link
Contributor

@jitendrapurohit how does this work - the description implies you are loosening permissions but the code change is a tightening

FWIW I think it's best to define perms in the menu xml for the url

@jitendrapurohit
Copy link
Contributor Author

@eileenmcnaughton The line modified in this PR is for building the manage event links on the event info page -

Screenshot 2020-01-15 at 2 58 09 PM

Before this change, only access CiviEvent was used to check and load these links using CRM_Event_Page_ManageEvent::tabs($enableCart). This function uses Event get call which failed for anonymous users.

As these links are displayed on tpl to users having edit all events permission, the PR ensures the same on php side too.

@eileenmcnaughton
Copy link
Contributor

OK - that makes sense now

@eileenmcnaughton eileenmcnaughton merged commit d44f188 into civicrm:master Jan 16, 2020
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.

2 participants