-
Notifications
You must be signed in to change notification settings - Fork 1
OS2FORMS-371 Added easy access to assigned maestro task by token #131
Conversation
rimi-itk
left a comment
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.
Looks good. === should be used for comparisons rather than just ==.
os2forms_forloeb.module
Outdated
| function os2forms_forloeb_entity_access(\Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account) { | ||
| if ($operation == 'update' && $entity instanceof WebformSubmission) { | ||
| $token = \Drupal::request()->query->get('os2forms-forloeb-ws-token'); | ||
| if ($token && $token == $entity->getToken()) { |
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.
For consistency, we should always use === for comparison.
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.
Fixed
| // Catch os2forms-forloeb access token and pass it further. | ||
| if ($form instanceof RedirectResponse && $token = \Drupal::request()->query->get('os2forms-forloeb-ws-token')) { | ||
| // Check token to previous submission and update it to new one. | ||
| if ($token == $webform_submission->getToken()) { |
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.
Use === here.
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.
@andriyun, do you have local commits that haven't beed pushed?
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.
@rimi-itk I just pushed fixes for these two changes you requested
rimi-itk
left a comment
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.
Very good job.
|
@rimi-itk I can not go further with it. |
|
Hmm … I cannot merge either, @andriyun. @mBoegvald & @madsnorgaard, can you help us out? |
|
I will squash and merge. Hope you are all well! |
Followup for PR130