I've read a bit in the forums about the effort to enhance user access levels, such as per node, and based on taxonomy. I just read that groups.module for 4.4 isn't working yet. I am trying to figure out how to hack the blog module to make it accessible to everyone - annonymous users - and then any other defined roles, while keeping the rest of the "content" non-accessible to annonymous users.
I guess, we're trying to figure out how to do a per-node access content hack by making the blog accessible to annonymous (and/or every user) users but the rest of the "content" not accessible to annonymous users. (because right now you must select "access content" or not, when setting up permissions). Is this a matter of changing a couple lines in the blog module, or is it not that simple?
Comments
Please share info
We also desperately need this, pretty much as you described. I like most everything about Drupal, and I'm a good programmer, but I don't know PHP or the Drupal codebase yet, and probably won't be able to grok it before the pressure builds from my user community and I'm forced to look at other web backends...
I've done something like this in webform.
I've done something like this in my webforms module.
http://drupal.org/node/view/7014
I've also done a hackish solution for the static page node in a recent project (drupal 4.3.0). I'm on vaccation and I don't have that code with me but I'll post it here when I get back home on monday.
tax_hack
I ended up porting the taxonomy_access patches to the 4.4.0 codebase, and it seems to work ok. Took me a bit, since I didn't really know PHP, but the Drupal code seems fairly clean and modular. (applause)
There are still a couple oddities I want to fix (forum navigation block should ideally hide topics whose nodes aren't viewable). But once I do, I'll post diffs in case anyone else wants to see this.
This is closer to what we really wanted, since the structure of the forums is more appropriate than blogs for our site. (Check it at http://democracyforcolorado.com/ if you're interested.) Now all subtopics under "public" are wide open, at least to authenticated users, and those under "committees" are restricted to those having a specific role.
Solution: add a new permission
Add a new perm:
Change this function:
To look like:
Then, change the user_access calls that currently check against the "access content" perm to alternatively check "access blog content". Any place where you see:
Replace it with:
In the version of blog.module that I'm running, I found 3 instances of the user_access function call that would need to be altered.
Then, in your user permissions admin page, the new permission option ("access blog content") should appear. Check it for anonymous users.
Could this be done on 4.5?
Hello,
Since much has changed on 4.5, I was wondering whether you have done this on 4.5 yet? I have tried this out on 4.5 and I cannot get it to work. I like having this new permission...it allows you to control access globally by the admin, rather than by a node by node basis by each user. If you have done this for 4.5, could you please post the code? It would be much appreciated.
Thanks,
Larry
--There are no Kangaroos in Austria--