Details
-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.7.30
-
Fix Version/s: None
-
Component/s: CiviEvent
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
If CRM_Event_BAO_Event::checkPermission($dao->id) is called repeatedly, i.e. looking at several events, it only returns a permission on the first event. This seems to be because when first called, it gets the first event's permissions and then remembers them in subsequent calls. Instead, it should be getting the permissions on all events and remembering them, shouldn't it?
Removing lines 2077 to 2080 ensures that it doesn't just get permission for the first event queried, but all relevant events.
I plan to generate a PR for this.