Drupal Workflow and Access control

Posted on

Large organizations want to, or may actually need, strict access control and content review workflows to manage the publishing process on their website. Drupal's default roles and permissions system is designed to handle the simplest of setups. However, there is a wide variety of modules that each address these needs. Many of them overlap, some complement each other, while others are abandonded and haven't been ported to Drupal 7. In this article, I'll look at some active modules for these requirements.

Revisioning for Basic Workflow

Unless your web publishing workflow is very complicated -= in which case, I think you have other problems - the Revisioning module should suit a basic author-editor review setup. You'll need at least two roles, an author role that can create and update but not publish new nodes, and an editor role that reviews and publishes changes made by authors.

Authors write content that prior to being made publicly visible must be reviewed (and possibly edited) by moderators. Once the moderators have published the content, authors should be prevented from modifying it while "live", but they should be able to submit new revisions to their moderators.

Once installed, the module provides a view to show revision status at /content-summary.

Content Access for write privileges

The Content Access module allows more fine grained control over view, edit, and delete permissions. Furthermore, it allows you to set access controls on a per node basis. This lets you restrict the set of pages, stories, or other content types that a single role can change.

This module allows you to manage permissions for content types by role and author. It allows you to specifiy custom view, edit and delete permissions for each content type. Optionally you can enable per content access settings, so you can customize the access for each content node.

If you need "serious" workflow in your Drupal, there is the aptly named Workflow module, and the newer State Machine and Workbench Moderation modules. These modules seem to be actively developed, and with enough time, tweaking and experimentation should help solve many workflow issues.

Tags: Drupal

─── ✧ ─── ✦ ─── ✧ ───

A new venture: musketeers.me

Posted on

This has been in the works for a bit now, and I'm excited to announce that along with Eli White, Kevin Bruce, and Sandy Smith, we've formed muskeeters.me. We worked well together at our previous venture, that we wanted to keep it going. The new venture will do the usual web consulting, from strategy and planning, systems architecture with an eye on scaling, through design and development. We've also kicked around our own product ideas to work on, which we can share sooner rather than later.

Tags: consulting, Real Life

─── ✧ ─── ✦ ─── ✧ ───

Automating FTP uploads

Posted on

I needed to automate copying files for a website that I was building. Since this site was hosted on an inexpensive shared hosting plan, I didn't have the luxury of shell or rsync access to automate copying files from my local development environment to the host. The only option was FTP, and after wasting too much time manually tracking down which files I needed to update, I knew I needed an automated solution. Some googling led me to lftp, a command-line and scriptable FTP client. It should be available via your distribution's repository. Once installed, you can use a script like the one below to automatically copy files.

{syntaxhighlighter BASH} #!/bin/sh # paths HERE=`pwd` SRC="\$HERE/web" DEST="\~/www" # login credentials HOST="ftp.commodity-hosting.com" USER="mysiteusername" PASS="supersecretpassword" # FTP files to remote host lftp -c "open \$HOST user \$USER \$PASS mirror -X img/* -X .htaccess -X error_log --only-newer --reverse --delete --verbose \$SRC \$DEST "

The script does the following:

  • Copy files from the local ./web directory to the remote \~/www directory.
  • Uses \$HOST, \$USER, \$PASS to login, so make sure your script is readable, writeable, and executable only by you and trusted users.
  • the lftp command connects and copies the files. The -c switch specifies the commands to issue, one per line. The magic happens with the mirror command which will copy the files. Since we added the --only-newer and --reverse switches, this will upload only files which have changed.
  • You could be a little safer and remove the --delete switch, which will remove files from the destination which are not on your local machine.
  • You can use the -X to give it glob patterns to ignore. In this case, it won't touch the img/ directory or the .htacess file.

If you're still moving files over FTP manually, even with a good GUI, it'll be worth your time to automate it and make it a quicker, less error-prone process.

Tags: Linux, Programming

─── ✧ ─── ✦ ─── ✧ ───