Requiring User Login for Specific Pages

Drupal Version

If you are using the CAS module for user authentication, you can require users to be logged in to their GT accounts before they can access specific pages on your Drupal site.

Enabling Restrictive Access (Drupal 7)

  1. Visit the CAS configuration page on your Drupal 7 site, at Configuration -> People -> CAS settings
  2. Under REDIRECTION, locate Require CAS login for and check the setting for specific pages.
  3. In the textbox under Specific pages, type in one page path per line (with no starting slashes)
  4. Select Save configuration at the bottom of the page once completed.

Enabling Restrictive Access (Drupal 10)

  1. Visit the CAS configuration page on your Drupal 10 site, at Configuration -> People -> CAS
  2. Under FORCED LOGIN, locate Pages and type in one page path per line (include starting slashes)
  3. You may need to select the Enabled checkbox - untested and unclear as to whether Enabled has to be on when only forcing logins on specific pages.
  4. Select Save configuration at the bottom of the page once completed.

Commonly Protected Paths

Commonly protected paths include:

  • 'contact' for the site-wide contact form
  • 'user' for the site-wide login page
  • 'forms/*' for every form you create under this fake directory