The alternative behaviors for when the user is denied access to the form (re: #2943879: How to display alternate text when the user is not allowed to create a Webform ?) still don't seem to be working.

I've updated to 8.x-5.0-rc21, run associated DB updates, cleared cache, and tried the new settings.

I have a webform that can only be submitted by Authenticated users. This is set in /admin/structure/webform/manage/MY_WEBFORM/access, in the Create Submissions section.

On /admin/structure/webform/manage/MY_WEBFORM/settings/form, in the Access Denied section, none of the options for When a user is denied access to this webform have any effect. When I visit the URL for the webform as an Anonymous user, I only see the node's body text. No additional inline text and no redirects. (When I visit as an authenticated user, the form displays and works property). My ideal functionality is the Inline text option, but, as I said, none of the choices have any effect.

I hope I'm understanding the intended behavior correctly.

Thank you!

CommentFileSizeAuthor
#8 3001355-8.patch4.72 KBjrockowitz
#5 3001355-5.patch4.72 KBjrockowitz

Comments

jeffschuler created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

@jeffschuler Did you clear Drupal's cache? (possibly two times)

jeffschuler’s picture

Thanks for your quick response!

Yes, I've cleared cache many times. Tried this on both a local dev and production version of a site, and with a webform that has existed for awhile (pre-5.0-rc21) as well as with a newly created webform.

jrockowitz’s picture

I found this unrelated bug #3001446: Access denied message is not being displayed.

Access denied handling has not been properly set up for webform nodes. I need to look into this issue.

Conceptually, only the access denied message should be displayed. I am not sure we can or should redirect to the login page when a user can access a node but not the webform

jrockowitz’s picture

StatusFileSize
new4.72 KB

@jeffschuler The attached patch is refactoring the webform field so that the access denied message is displayed on a webform node when any custom access denied behavior is defined.

Let's first see if any tests are going to break.

BTW, thanks for catching this issue.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: 3001355-5.patch, failed testing. View results

jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.72 KB

Status: Needs review » Needs work

The last submitted patch, 8: 3001355-8.patch, failed testing. View results

jrockowitz’s picture

Patch is applying fine locally. I think there might be an issue on D.O.

When I have time I will run all the test locally.

jeffschuler’s picture

Patch applied cleanly to 8.x-5.0-rc21 but would not apply to 8.x-5.x-dev.
In the patched 8.x-5.0-rc21, the access denied text showed properly.
Thanks a lot for your quick and expert help!

  • jrockowitz committed ad0276a on 8.x-5.x
    Issue #3001355 by jrockowitz: New access denied behaviors not working
    
jrockowitz’s picture

Status: Needs work » Fixed

I tested the patch locally and everything seems fine. I committed the patch. Please download the latest dev release to review.

jeffschuler’s picture

Working. Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.