Workbench Access developer notes

This is a port of the README file within the Workbench Module. It may need to be adapted to fit the Handbook style.

API documentation

Workbench Access is designed to be a pluggable access control system. New access control systems should be possible by following the documentation in workbench_access.api.php, distributed with the module.

Currently, new plugins must be loaded from the /modules folder inside the workbench_access directory. Fixing that is on the Feature roadmap.

Note also that we do not use Field API for data storage. This decision is deliberate for three reasons:

  • Section data for nodes is 'stateless'. That is, it is permanent data that is independent of node revisions.
  • Doing the necessary queries and joins to custom table data is easier than using the Field API, and likely faster.
  • To properly integrate with Views, we need direct control over the table structures of our data.

However, we may consider moving to Field storage in later versions.

Database schema

Workbench Access creates four tables in your Drupal installation.

  • workbench_access
    Stores data for the active access schemes on the site.
  • workbench_access_node
    Stores the section assignments for each node.
  • workbench_access_role

Troubleshooting Workbench Access

This is a port of the README file within the Workbench Module. It may need to be adapted to fit the Handbook style.

Some helpful tips to make answering questions easier.

Using Workbench Access

This is a port of the README file within the Workbench Module. It may need to be adapted to fit the Handbook style.

Now that we have configured our access scheme and assigned editors, we can resume normal site operations. The major feature of Workbench Access is to assign content (or Drupal 'node') to a specific editorial section.

Note that users who are not assigned to an editorial section may not be allowed to create content on the site.

Assigning nodes to sections

By design, Workbench Access provides its own editing form element. This element is assigned to all content types on your site.

On the content editing screen, the Workbench Access element will appear as a selection list. This form element is specific to the current editor. The selection options will only display the sections that the user can access. For example, our Library editor will have a form similar to:

Workbench access *
    < select>
      - Library
      -- Library Staff
      -- Library Visitors
    < /select>
    Select the proper editorial group for this content.

The editor may select the proper section using this form element. At this time, only single-section assignments are supported.

Workbench Access Permissions

This is a port of the README file within the Workbench Module. It may need to be adapted to fit the Handbook style.

Workbench Access comes with six permissions:

  • Administer Workbench Access settings:
    Allows users to configure Workbench Access access schemes and sections.
  • Assign users to Workbench Access sections:
    Allows users to assign editors to sections. (Note that these editors must have the 'Allow all members of this role to be assigned to Workbench sections' permission described below.
  • Allow all members of this role to be assigned to Workbench Access sections:
    Allows a user to be assigned as an editor of a section. This permission is used to check whether a user can access Workbench Access forms and features.
  • Batch update section assignments for content:
    Allows a user to access the batch update form at admin/content. See section 5.4 for details.
  • View Workbench Access information:
    Allows users to see information and messages related to Workbench Access, particularly section assignments of content pages. Useful for debugging and support.
  • View taxonomy term pages for Workbench Access vocabulary:

Workbench Access Installation

Install the module and enable it according to Drupal standards.

After enabling the module, you wil be asked to configure its settings. On the configuration screen, you may choose to install a test vocabulary. This vocabulary will help you learn how Workbench Access works.

When you install the test vocabulary, it will create a test access scheme for you. This scheme is called 'Museum' and it is created as a Taxonomy vocabulary. (It has a machine name of 'workbench_access', however.)

You should be able to view the structure at the path:

Admin > Structure > Taxonomy > Museum

You may use this to build your access hierarchy if you wish. Simply edit the term names to reflect the real use-case for your site.

The created hierarchy mimics a Museum web site, divided into three sections, each of which has child sections for Staff and Visitor pages:

  • Museum
    • Exhibits
      • Staff
      • Visitors
    • Library
      • Staff
      • Visitors
    • Gift Shop
      • Staff
      • Visitors

All existing site content will be assigned to the top-level section.

Workbench Access Terminology

This is a port of the README file within the Workbench Module. It may need to be adapted to fit the Handbook style.

Throughout this documentation and when using the module, you will run across terms that have special meaning. This brief glossary tries to explain those terms.

Pages

Subscribe with RSS Subscribe to RSS - Needs copy/style review