After a short email conversation with Mark Fredrickson about workflow based node permissions, it seemed to be feasible to grab the workflow_access code from na_arbitrator (which was discontinued after Drupal 5.0 got most of it's functionality included). Now because I needed a workflow and role based access scheme for my thesis project anyway, I grabbed the code and updated it for Drupal 5.0. What's new:
- added an .info file
- added postgresql compatibility (but not tested it)
- removed the "hunmonk dependency hacks", which are not required now dependecies being part of Drupal core
- applied the new node access API based on the fantastic node_access_example module
- done a general clean up, less magic for form altering and so on... documented special stuff like the -1 rid used, removed many temp variables and so on
- used Drupal constants where available, done away with magic role ID numbers
- added phpdoc comments where possible
Tested the module on PHP 5.1 with MySQL 5.0 and workflow module latest DRUPAL-5 branch version (1.54.2.6). The access editing seems to work nicely, data is stored, permissions are only granted when I rule them.
I would welcome the inclusion of this module as part of the workflow module suite.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | workflow_access.info_.txt | 138 bytes | gábor hojtsy |
| #1 | workflow_access.install.txt | 1.05 KB | gábor hojtsy |
| workflow_access.module.txt | 6.53 KB | gábor hojtsy |
Comments
Comment #1
gábor hojtsyThe install file.
Comment #2
gábor hojtsyThe info file.
Comment #3
moshe weitzman commentedthanks so much, gabor. great work. i read through the code and it looks very fine. there is some fairly unusual table prefix/suffix stuff but perhaps there is no easier way. that shouldn't block this patch in any case.
Comment #4
moshe weitzman commentedI also like the heredoc usage in .install file. i haven't seen that before.
Comment #5
gábor hojtsyMoshe, yes, we are doing a table with three columns in there. That was lifted from metlinofchaos' prior act, slightly modified to get rid of the tbody borders. Maybe there is a better way, in fact a css class on the table would be desirable for themers to get some free tinkering :) Although I bet themers will not start with the rarerly seen workflow access permission table, and would very rarely if every would be interested in theming it at all.
The heredoc syntax for tables was lifted from (erm.. used for consistency with) workflow.install itself, so not something for me to deserve credit for :)
Comment #6
mfredrickson commentedFantastic! I made a couple of small changes and left myself 2 TODO notes for later (very minor issues).
I can't thank you enough, Gabor!
I'll be releasing workflow-1.1 shortly.
Comment #7
killes@www.drop.org commented