Merged in feat/sw-2967-mystay (pull request #2666)

feat(mystay):SW-2967 - allow access if booking.guest == logged in user

* feat(mystay):SW-2967 - allow access if booking.guest == logged in user

* Fixed failing tests


Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
Linus Flood
2025-08-18 11:50:57 +00:00
parent f8a4b88170
commit 78e3259317
2 changed files with 16 additions and 26 deletions

View File

@@ -34,11 +34,6 @@ describe("Access booking", () => {
accessBooking(loggedInGuest, "Booking", badAuthenticatedUser)
).toBe(ERROR_UNAUTHORIZED)
})
it("should deny access if refId mismatch", () => {
expect(
accessBooking(loggedInGuest, "NotBooking", authenticatedUser)
).toBe(ERROR_UNAUTHORIZED)
})
})
describe("for anonymous booking", () => {
@@ -145,7 +140,7 @@ const authenticatedUser: SafeUser = {
zipCode: undefined,
},
dateOfBirth: "",
email: "",
email: "logged+in@scandichotels.com",
firstName: "Authenticated",
language: undefined,
lastName: "Booking",