Skip to content

Firestore rules: refuse a booking on days the listing does not offer #310

Closed

Description

@lucaschristiansson

The app only lets a renter request days from the listing's availableDates, but validBooking in firestore.rules does not check it: a booking on any future day is accepted.

Rules cannot loop over a date range, so check at least that startDate and endDate are both in the listing's availableDates, and add rules tests for it.

Depends on #299, which adds availableDates to listings. Part of #26.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions