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
RES-1633 unapproved events #598
Conversation
…vents # Conflicts: # app/Http/Controllers/API/NetworkController.php
|
SonarCloud Quality Gate failed.
|
# Conflicts: # tests/Feature/Events/ExportTest.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it adds a method for checking whether a user can see an event based on event and group approval. And then amends Calendar, Export, and Search to take this into account.
- Added in a permission check for Calendar Events, which seems good.
- Wondered about ExportController::devices - one place it is called is https://therestartproject.org/download-dataset/ which is a public call - so I wondered if the permission check in userCanSeeEvent is added, whether this would then return no data here. But as discussed it will still be fine, as it will return devices from events where both the events and groups are approved.
- I get a 'Maximum execution time of 60 seconds exceeded' when trying http://restarters.test:8000/export/devices locally with the new code change - I guess the extra permission check slows it down? /export/devices completes if I run it off develop.
- Seems correct to filter Search::parties by userCanSeeEvent.
- approved is returned via the API, but events are not filtered dependent on approved. This is correct, as we let the client side decide what they want to do.
|
Kudos, SonarCloud Quality Gate passed!
|










This builds on RES-1101, so the diffs will look wrong until that is merged.
Unapproved events (and devices of those events) should be visible to:
So:
userCanSeeEventmethod inUserto contain this logic.ExportController, add this logic and a new approved column into the export.Search, add this logic.approvedproperty in the API forPartyandPartySummary.EditWordpressPostForEventParty::ofTheseGroups.CalendarEventsControlleradd this logic and fix up the event status, including for cancelled events.