Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Port shield-page callback page to the module from d7 to d8
- An Event Subscriber that will take care that whether to redirect the user based on the conditions.
- A page where user will be redirected to.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2780223-11-14.txt | 3.25 KB | alan-ps |
#14 | shield_pages-add_callback_page-2780223-14.patch | 12.2 KB | alan-ps |
#12 | shield-page-per-page-pass.png | 401.22 KB | naveenvalecha |
#12 | Screen Shot 2016-09-02 at 13.10.16.png | 131.19 KB | naveenvalecha |
Comments
Comment #2
naveenvalechaComment #3
alan-ps CreditAttribution: alan-ps commentedI will look at this.
Comment #4
alan-ps CreditAttribution: alan-ps commentedI think it can be closed as all necessary work for configuration entity was done in child issue. We need edit/delete management pages for shield page configurable, but there are another issues for this:
https://www.drupal.org/node/2780217
https://www.drupal.org/node/2780221
Comment #5
naveenvalechaThis is the default callback page where we redirect the user to if it does not have access. So this task needs two things
1. An Event Subscriber that will take care that whether to redirect the user based on the conditions.
2. A page where user will be redirected to.
Do you need more clarity on it. Feel free to reach on IRC : naveenvalecha
Comment #6
alan-ps CreditAttribution: alan-ps commentedThanks for explanation. I will look at this!
Comment #7
naveenvalechaComment #8
alan-ps CreditAttribution: alan-ps commentedThis is a patch.
Comment #9
naveenvalechaThanks for the efforts
Inject the Current user service here.
Same as bove. inject the service here.
same here, inject the service here.
instead of $_SESSION, use the request object to get and set in the session.
e.g.
see here https://www.drupal.org/node/2380327
Comment #10
alan-ps CreditAttribution: alan-ps commentedI will look at this today.
Comment #11
alan-ps CreditAttribution: alan-ps commentedfixed
Comment #12
naveenvalechaSetting it to N/W
I have tested it thorougly and its not working
Testing Steps :
Comment #13
alan-ps CreditAttribution: alan-ps commentedComment #14
alan-ps CreditAttribution: alan-ps commentedI added additional path validation (path has to start with a slash) + field_prefix, which will help to fill field correctly.
Comment #15
alan-ps CreditAttribution: alan-ps commentedCan we commit the patch above is all is fine?
Comment #16
naveenvalechaAdded to my todo list