Article

Drupal 7 Views - How to restrict views page and contents by taxonomy term role, but provide a global text message publicly

How to restrict views page and contents by taxonomy term role, but provide a global text message publicly

In some instances, you may want to restrict your views page (in this case to permit only selected roles to view contents categorized in certain taxonomy terms). You also, however, will want some text available and viewable publicly on the same Views URL or page. To do this, you may follow these simple steps.

Taxonomy Access Control Lite (TAC) Module

  1. Install the TAC module
    https://www.drupal.org/project/tac_lite
     
  2. Configure a scheme, e.g. View content, then limit or allow permissions by role. This completely hides the Views page and content. However, this will completely render the view as Access denied, with all the global header/text messages blocked as well.

Views Role Based Global Text Module

  1. Comes in Views Role Based Global Text module
    https://www.drupal.org/project/views_role_based_global_text
     
  2. Install and configure to allow display for anonymous (public) role. There is a "Role" setting while entering text either on header or footer. 

See also related article Drupal 7 Views - How to show a global text message publicly but hidden for logged in users

Other similar modules:

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.