Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
rest.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2017 at 14:57 UTC
Updated:
25 Sep 2017 at 13:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersFirst: thank you so much for taking the time to report this! ❤️ We need this kind of feedback to make API-First Drupal better!
Good question! We do have
/user/login_statusfor checking the login status when using cookie authentication. And these are the relevant routes:+
Note how the values for
_user_is_logged_inare each other opposite! This is why we also have/user/login_statusas I said before:So: yes.
Yes! Let's do it :) Converting this issue from a support request to a task.
Comment #3
wim leersFirst: expanded test coverage to check the 403 and assert a helpful error message.
This patch should fail.
Comment #4
wim leersAnd now with the changes to add a helpful message. Patch should pass tests now.
Comment #6
dawehnerNice improvement. I like that this could be one day maybe even used for normal 403 sites ...
Comment #7
wim leersYep :)
This is where our time investment in infrastructure/foundation work in 8.2 and 8.3 is paying off: both the test coverage and the logic change are trivial 😀✋️
Comment #8
wim leersBTW I also pinged @blainelang after posting #2+#3+#4 :) https://twitter.com/wimleers/status/903383065300533250
Comment #9
blainelang commentedThanks Wim, this is much better. I've tested the patch and successfully getting the new message. Nice improvement and thanks for all your hard effort and support for D8 REST!
Comment #10
wim leersYou're welcome :)
Comment #14
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!