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!

CommentFileSizeAuthor
#1 625886.patch5.57 KBBevan
pcapbt-bugfix-d5.patch5.19 KBlaken

Comments

Bevan’s picture

Status: Active » Fixed
StatusFileSize
new5.57 KB

Oops! 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!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.