-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactored session rest actions to their own controller (EZP-26329) #1782
Refactored session rest actions to their own controller (EZP-26329) #1782
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, but seems to need some adjustments to get travis and ezrobot to be green.
Hmm indeed. I did not get these errors locally... will check. |
5794017
to
e903165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, deal with comments as you wish :)
- '@ezpublish_rest.session_authenticator' | ||
- '%ezpublish_rest.csrf_token_intention%' | ||
- '@?security.csrf.token_manager' | ||
- '@?security.csrf.token_storage' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we standardised on double quotes for these...? (Very minor issue, it's just nice to be consistent.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we ? Maybe...
Gotta admit that I actually prefer single quotes because:
- they don't require that you escape
\
- they're demanded by our coding standards for PHP (but not for YAML, I agree)
But it is indeed not consistent with what we've done so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: Standardise and make it consistent, one way or the other ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to single quotes, consistency > escaping :)
use eZ\Publish\Core\REST\Common\Exceptions\NotFoundException; | ||
use Symfony\Component\Security\Core\Exception\AccessDeniedException; | ||
use Symfony\Component\Security\Core\Exception\AuthenticationException; | ||
use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another minor nit: These are easier to read when sorted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And they're sorted :)
Did some extra cleanup, and applied @glye's comments. |
delete, create and refresh session actions are deprecated in the User controller, and moved to a new one, SessionController.
6c6c1f9
to
f040223
Compare
Delete, create and refresh session actions are deprecated in the User controller,
and moved to a new one, SessionController.
The REST functional tests now cover most of the session interactions, and passed without any issue. The code was moved as is from the updated one in the User controller, and Container calls changed to injected properties.