feat: added WIP flag to feeds #812
Merged
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.
Summary:
This pull request introduces visibility restrictions for work-in-progress (WIP) feeds in
feeds_api_impl.pyandsearch_api_impl.py, based on user email domains. It includes a new function to determine if a user’s email is restricted, updating query filters accordingly to enforce feed visibility rules. Additionally, a new SQL script is included to update the database schema and refresh the materialized view to support these changes.Expected Behavior:
Feeds marked with an internal status of "WIP" are only visible to users with email domains ending in
@mobilitydata.org. Users with other domains will not see these WIP feeds.Testing Instructions:
gtfs,gtfs_rt, andfeedsendpoints, as well as the search functionality, while setting thex-goog-authenticated-user-emailheader to emails ending with both@mobilitydata.organd non-@mobilitydata.orgdomains.@mobilitydata.orgemails can view WIP feeds.Testers are encouraged to follow these instructions but are also welcome to explore other test cases to ensure robust behavior outside the listed scenarios.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything