0

I have a form that was created using Webform 7.x-4.0-rc3. The completed form submits successfully, form values are stored correctly, notification emails are generated, and the confirmation page is displayed.

I want to ensure that only CAS-authenticated users can access this form. With CAS 7.x-1.4 installed on my site, I've updated the CAS configuration and added the form page's URL to the "Require CAS login for specific pages" list. Redirection to CAS and CAS authentication work as expected.

However, the completed form will not submit for a CAS-authenticated user. By dumping $form_state during the execution of drupal_build_form(), I can see that after the user completes the form and submits, $form_state contains none of the values of the completed form and drupal_build_form() treats it as a newly loaded form.

Somehow the interaction with the CAS server when the authenticated user submits is causing the form to be reinitialized, but I don't know where/how.

Anyone have suggestions for how to attack this? Thanks in advance....

0

It sounds like your relying on CAS to provide an access check to the URL path. Webform supports limiting access to a webform by drupal Role.

If your user has authenticated via CAS and is logged into the site simply limit the webform access to users with Authenticated Users or any non-Anonymous user role.

0

tenken, thanks for your answer. My error was simple: I had not enabled automatic account creation in the Drupal CAS module configuration. With this option disabled, the authenticated user was not actually logged in to the site and the form submission was treated as anonymous.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.