Hi Bevan,
Awesome module!
I found I needed to make some changes to get this to actually work on Drupal 5. The attached patch does the following:
- change perm names from 'can access…' to 'access…' for consistency with Drupal convention
- Rework pcapbt_user_can_access_node() to work in Drupal 5 ($GLOBALS['user'] is D6-only)
- Fix logic to allow access if node has no terms in the restricted vocab
- use aliased path for destination if available (this needs some further testing…)
- fix typos in README
With this patch it's working now for me!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 625886.patch | 5.57 KB | Bevan |
| pcapbt-bugfix-d5.patch | 5.19 KB | laken |
Comments
Comment #1
Bevan commentedOops! I forgot to re-test content access to regular nodes.
I committed the attached patch which includes all of those fixes, except for "use aliased path for destination if available (this needs some further testing…)". I don't think this is necessary, and I believe it is not conventional. Though I haven't tested either. Let's address that in a seperate issue.
I standardized comments and simplified a couple of the logic changes to make the flow of the code easier to read.
Thanks!