Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling: Fix status codes #1854

Merged
merged 5 commits into from
Sep 2, 2019
Merged

Commits on Aug 20, 2019

  1. Fix inconsistent status codes

    HTTP 401 should be used when logging in (i.e. authenticating) would make
    a difference; HTTP 403 is reserved for requests that fail because the
    already authenticated user is not authorized (i.e. lacking permissions)
    to do something.
    franzliedke committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    04bcf1e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    279c7df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0836d99 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2019

  1. Move authentication check into assertCan() method

    This will cause the right error (HTTP 401) to be thrown whenever
    we're checking for a specific permission, but the user is not even
    logged in. Authenticated users will still get HTTP 403.
    franzliedke committed Aug 21, 2019
    Configuration menu
    Copy the full SHA
    b60617b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b65355 View commit details
    Browse the repository at this point in the history