Conversation
…(PPT-2247) The permission lives in the staff API `event_metadatas` table, it is not part of a calendar event, so it never appeared in the Bookings cache. The default of PRIVATE was applied to every event and the public list was always empty. Permissions are now looked up with `StaffAPI.query_metadata`, passing the id, ical_uid and recurring_event_id of every cached event as `event_ref` (batched, so the query string stays small). Metadata that belongs to an event instance takes precedence over the metadata of the recurring master, so a single public occurrence no longer makes the whole series public. Events that are private on the calendar remain excluded, their title and host have already been masked by the Bookings driver. A permission can also change without the event changing, and a driver only publishes a status when the value has changed, so the `bookings` subscription can't keep the cache fresh on its own. The filter is now re-applied on a schedule (`metadata_refresh_minutes`) and whenever `update_public_events` is called.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.