We're updating the issue view to help you get more done. 

"Refuse Gift" gives 500 error if you aren't logged in as the recipient

Description

Scenario A:

  1. Log in as UserA

  2. Post or edit a work to be a gift to UserB

  3. Log out

  4. Log in as UserB

  5. Go to UserB's gifts page, but don't do anything

  6. In another tab in the same browser, log out

  7. Still in the other tab, log in as someone other than UserB

  8. In the tab that is open to UserB's gifts page, press "Refuse Gift"

For Scenario B, skip the step where you log in as someone other than UserB – stay logged out and then try the "Refuse Gift" link in the first tab.

What happens
A 500 error. (The status of the gift does not change, which is correct.)

What should happen instead
For Scenario A, you should be redirected to homepage with an error saying, "Sorry, you don't have permission to access the page you were trying to reach."

For Scenario B, you should be redirected to login page with an error saying, "Sorry, you don't have permission to access the page you were trying to reach. Please log in."

Environment

None

Status

Assignee

Tal Hayon

Reporter

Sarken

Roadmap

Misc

Priority

Low

Affects versions

0.9.214

Fix versions

Components

BackEnd

Difficulty

Medium

Required Access Level

None

Milestone

Internal 0.9