Conditional Roles

Component ID

1098290

Component name

Conditional Roles

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

1135

Component created

Component changed

Component body

After much consideration, I've decided to scrap this module and take the project in a different (and, I hope, far better) direction as Access Control Kit. No further development will be done on Conditional Roles, other than to provide a migration path to ACK.

Conditional Roles is a node access module that allows you to grant permissions to users based on any arbitrary property of a node. The module works by optionally adding conditions to user role assignments, and includes an API to allow other modules to define their own conditions.

For example, say you had a role with the 'edit any article' permission. With Conditional Roles, you could assign that role to a user only for articles that have been promoted to the frontpage, or articles that have been tagged with a certain taxonomy term, while still giving other users the role site-wide.

Development status

This is very much a work-in-progress, and is currently only intended for other developers to test, experiment with, and provide feedback on. Do not install this on a production site. Major items left to be done before we reach a stable release include:

  • finalize the API
  • build the administrative UI
  • support conditions based on basic node properties (promoted, sticky, etc.)
  • support conditions based on list fields
  • support conditions based on taxonomy terms
  • include comprehensive SimpleTest coverage (partially complete)

Developers who use the Workbench suite may also be interested in the Conditional Roles for Workbench Moderation module (also a work-in-progress).