Code Monkey home page Code Monkey logo

drupal-feature-access-handling's Introduction

Drupal 7 University of Cambridge user access (403) handler feature

This is a general 403 handler.

This feature handles two scenarios: 1), an anonymous user trying to access a protected page, 2), a logged-in user trying to access a page they do not have sufficient permissions to access.

In order for this to work you need to create a completely blank page with the title something like "Access Denied". The title can be anything - you just need to remember the alias or NID for the next step.

Save the (blank) page and go to admin/config/system/site-information. In the "ERROR PAGES" section for "Default 403 (access denied) page" enter either the alias or NID for the page you've just created (it should be "access-denied" if you gave it the title of "Access Denied"). Note the NID will be saved on this page if you enter an alias. If the module is enabled that's all you need to do.

The content of this page will be dynamically populated depending on which of the above two scenarios arise. In scenario 1) the user will be invited to log in. In scenario 2) the user will be informed they don't have sufficient permissions.

Don't worry about the feature showing as "overridden" - this is normal because the NID of this page will almost certainly be different to the NID of the page on the site I created the feature on. The feature was partly to highlight the save that a 403 page need to be created and assigned to the 403 handler.

MA

drupal-feature-access-handling's People

Contributors

jeebsuk avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

andybatey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.