Project

General

Profile

Paste
Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / content_access @ ae34fb26

Name Size Revision Age Author Comment
  content_access_rules ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
  help ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
  tests ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
LICENSE.txt 17.7 KB f7a2490e about 10 years Assos Assos git mv htmltest drupal7
README.md 7.95 KB ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
content_access.admin.inc 12.8 KB ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
content_access.css 98 Bytes f7a2490e about 10 years Assos Assos git mv htmltest drupal7
content_access.info 317 Bytes ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
content_access.install 1.2 KB ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules
content_access.module 21.5 KB ae34fb26 almost 4 years Assos Assos Weekly update of contrib modules

Latest revisions

# Date Author Comment
ae34fb26 07/01/2020 11:11 PM Assos Assos

Weekly update of contrib modules

f7a2490e 02/13/2014 03:56 PM Assos Assos

git mv htmltest drupal7

View revisions

README


CONTENTS OF THIS FILE

  • Introduction
  • Requirements
  • Recommended modules
  • Installation
  • Configuration
  • Maintainers
  • Notes

INTRODUCTION

The Content Access module let you content manage access permission in a flexible and transparant way.

It provides two new permissions: view all (allows anyone to view the content) and view own (allows only the content creator to see his/her own content). It also gives access to the existing core permissions edit and delete on the same settings page.

It provides the following modalities:

  • Each content type can have its own default content access settings by role.
  • Optionally you can enable role based access control settings per content node.
  • Access control can be further customized per user if you have the ACL module enabled.

For more information and reporting, please visit:

Features:

  • It comes with sensible defaults, so you need not configure anything and everything stays working.
  • It is as flexible as you want. It can work with per content type settings, per content node settings as well as with flexible Access Control Lists with the help of the ACL module (see Note 1 at the end).
  • It reuses existing functionality instead of reimplementing it. So one can install the ACL module and set per user access control settings per content node.
  • It comes with a submodule named Content Access Rules Interations. It provides conditions and actions for the Rules module, which allows one to configure rule-based access permissions.
  • It optimizes the written content node grants, so that only the necessary grants are written. This is important for the performance of your site.
  • The module has a comes with automated testing to ensure everything stays working correctly.
  • It respects and makes use of Drupal's core permissions. This means that the "Access Control" tab provided by this module takes them into account and provides you a good overview of all applied access control settings on a single page (but see Note 2 at the end).

The module is designed to be simple to use, but can be configured to provide really fine-grained content access permissions.

REQUIREMENTS

None.

RECOMMENDED MODULES

  • ACL: To use Access Control Lists for per user access control.
  • Advanced Help Hint: Links help text provided by hook_help to online help and Advanced Help.
  • Advanced Help: When this module is enabled, the project's README.md will be displayed when you visit help/content_access/README.md.
  • Markdown: When this module is enabled, display of the project's README.md will be rendered with the markdown filter.
  • Node Export To export content access rules.
  • Rules: To configure rule-based access permissions.

INSTALLATION

The module is set up to require PHP ver. 5.6 or later. I do not want to keep supporting legacy PHP (at least not for free). If you need a version that runs on something more ancient, you have two options:

  1. Keep useing version 7.x-1.2-beta2. It does not restrict PHP version. It is very old tho', and is no longer recommended, nor is it supported.
  2. Ask me to create a separate branch of the project for a backport the current supported version to whatever version of PHP you need. Then get someone to support this branch.

If you go for the backport option: If you're a developer, request to become a co-maintainer of this project and then create and support the backport yourself. If you're not, sponsor someone to do the backport and to support it.

To install and enable, do the following:

  1. Install as you would normally install a contributed drupal module. See: Installing modules for further information.
  2. Enable the Content Access module on the Modules list page.
  3. If you want to use access control lists, download, install and configure the ACL module.

CONFIGURATION

Note that users need at least the permission "View published content" to be able to access published content. Furthermore note that content which is not published is treated in a different way by Drupal: It can be viewed only by its author or users with "Bypass content access control" permission. You can not use this project to manage access to unpublished content.

To inspect and change those permissions, navigate to Administration » People » Permisions and scroll down to the "Node" section.

Role based access control

To set up access control for a content type, navigate to Administration » Structure and click on "edit" for the content type you want to set up. There will be a new tab named "Access Control" that let you control access.

To set up role based access control, tick the boxes under "Role based access control settings". Note that only the "View" permissions are new permissions provided by this module. The "Edit" and "Delete" permissions are provided by the Drupal core, and can also be found if you navigate to Administration » People » Permisions. They are shown here to provide the full picture of what permission is set for the content type and role. It does not matter where you change these.

Per content node access control

There is a a checkbox to enable per content node access control settings. If enabled, a new tab for the content access settings appears when viewing content.

To configure permission to access these settings, navigate to Administration » People » Permisions and set the "Grant content access" permission for the relevant roles.

Advanced access control

The "Advanced" settings are only relevant if you are running multiple node access modules on a site.

A Drupal node access module can only grant access to content nodes, but not deny it. So if you are using multiple node access modules, access will be granted to a node as soon as one of the module grants access to it.

However you can influence the behaviour by changing the priority of the content access module as drupal applies only the grants with the highest priority. So if content access has the highest priority alone, only its grants will be applied.

By default node access modules should use priority 0 (zero).

Using access control lists

To make use of access control lists you'll need to enable per content node access control settings for the content type. At the access control tab of such a content node you are able to grant view, edit or delete permission for specific users..

MAINTAINERS

Content Access was created by fago (Wolfgang Ziegler).
It contains a lot of contributions from good_man (Khaled Al Hourani).
The current maintainer is gisle (Gisle Hannemyr).

Development and maintenance is sponsored by Hannemyr Nye Medier AS.

Any help with development (patches, reviews, comments) are welcome.

NOTES

Note 1: ACL integration is not yet working right.

Note 2: Note that this overview can't take other modules into account, which might also alter node access. If you have multiple modules installed that alter node access, read the paragraph about "Advanced access control".

Also available in: Atom