I have created a content type I only want my "team" role to be able to see. Other roles should not be aware of the existence of this type of nodes thereof.

On /admin/content/node-type/<typename>/access
I can untick the "View any content" box for anonymous and authenticated user, but when I click Submit, the checkbox for anonymous user reappears.

Versions:
Drupal 6.10,
ACL 6.x-1.0-beta4,
Content_Access 6.x-1.0,
Forum_Access 6.x-1.0-beta2

I tried ungranting "access content" for anonymous in /admin/user/permissions, but that meant that Instead of being able to grant the permission per-content-type, the boxes were greyed out for anonymous. (I have re-granted the access content permission).

Comments

niallhatton’s picture

I am having this excat same problem, I have a role "members" and unticked all other boxes apart from "members" and when I click submit the annonymous reappear. Please help :)

GreyHawk’s picture

Same issue here. On my 6.9 sites, working fine.

lsrzj’s picture

Same here, the only way to get around this problem so far was rolling back to drupal 6.9. It's a drupal version issue as I could notice.

fernando.mormul’s picture

Exactly the same problem here...
Drupal 6.10,
Content_Access 6.x-1.0,

mswi’s picture

Content_Access 6.x-1.0 with Drupal 6.8 works ok...but with Drupal 6.10, the same issue....

Brandonian’s picture

subscribing

lsrzj’s picture

Just adding some info, not only for a new content type, but for all site content already published. If you need to change the permission of published contents or you want to modify your content access for an existing content type it's impossible to ungrant anonymous permission because it keeps checking back the anonymous permission when permission changes are submited.

bitsize’s picture

Yes same issue here. Anonymous always to be granted. Worse than that, anonymous can now edit and delete which was not the case before.

lsrzj’s picture

Roll back to Drupal 6.9 until this module corrects this issue with Drupal 6.10 bitsize. A strange thing is that it seems that the module developers are not visiting this issue, no response until now. This module is great and my site has a heavy dependence on this module.

Ogredude’s picture

I am having this same problem as well. Downgrading to 6.9 is not an option.

Currently running d6.10, other access module is Taxonomy Access Control version 6.x-1.x-dev

Cannot deselect anonymous role from Content Access. Also, users still have access to nodes when I uncheck their roles in the access page. I've set the Content Access priority to a negative and a positive number, no change in behavior.

Of course, disabling TAC solves the problem with Content Access allowing roles access to things they shouldn't have. But I need TAC for the main part of my access control. I only really need to deny viewing of particular content types to everyone except a couple roles.

And even disabling TAC doesn't allow me to deselect the anonymous role.

Subscribing.

lsrzj’s picture

You tried to downgrade to D6.9 and the problem persisted? I downgraded and all worked fine again. The difference is that I don't have multiple modules to control content access only the module content_access.

Ogredude’s picture

Can't downgrade, we're running this on a Windows server and so are susceptible to the security hole in 6.9 that was fixed by 6.10.

fischerj’s picture

same issue for me after upgrading to Drupal 6.10.

I did some testing and found some strange database entries:

Example: I allowed view access (only) to user group #3 for node #1508. After saving permissions there were 3 entries in table node_access:

1) node: 1508 | gid: 3 | realm: content_access_rid | grant_view: 1 | grant_update: 0 | grant_delete: 0
2) node: 1508 | gid: 1 | realm: content_access_rid | grant_view: 1 | grant_update: 1 | grant_delete: 1
3) node: 1508 | gid: 1 | realm: content_access_author | grant_view: 1 | grant_update: 0 | grant_delete: 0

Entry #1 seems to be the normal behaviour as I found similar entries for earlier nodes (created before upgrading to 6.10).
The other 2 database entries with all grants set to 1 (#2) and realm set to "content_access_author" (#3) do not show up for any earlier nodes.

Hope, this may be of help when fixing the problem.

------

Workaround for those who cannot (or do not want to) revert to Drupal 6.9:

Run a cron job which eliminates all entries from node_access where gid=1 AND realm=content_access_rid AND grant_view=1 AND grant_update=1 AND grant_delete=1
I suspect no one is running a Drupal site, where anonymous users (gid=1) are granted delete access for a node. Therefore these database entries should usually not be necessary.

However: I take no response for any unwanted data losses :-)

rstryker’s picture

Subscribing. I'm having this issue as well.

wickwood’s picture

Title: Cannot ungrant annonymous view permission for new content type » Cannot ungrant anonymous view permission for new content type

Subscribing, I too suffer from this malady.

quentusrex’s picture

Same here. Please someone post a potential fix... Do we know where the code is breaking? why are those rows in the database if they are causing the issue?

quentusrex’s picture

Issue tags: +Security

This is a security issue.

fischerj’s picture

Found a patch at #384916: Permissions for anonymous user not saved but did not yet try if it's working.

Perhaps anyone could do so and post a feedback.

Thx!

corydoras2003’s picture

the patch is working...

Thx!!

andrew.eatherington@gmail.com’s picture

I can confirm that too. My version of Content Access 6.x-1.0 required patching and was a success with the patch above. Thanks

fischerj’s picture

patch is working for me, too.

tryitonce’s picture

Yes, it is working - but is it safe???

And you may have to go through all the content types and reinstate the original settings.

Not sure how to avoid this. Seems a bit risky if the upgrading to Drupal 6.10 wipes out such a sensitive settings as access_control.

Which in turns prompts my question is the patch safe or is it opening up a whole that was plugged by Drupal 6.10 release?

Thanks for this module, the good work and general support all around - a real joy to work with Drupal.

fischerj’s picture

I doubt that this patch opens any security holes.

CA module obviously uses some core Drupal functions for form processing which have been updated (and hopefully improved?) in 6.10. In other words: Former Drupal versions accepted some "fuzzy" (and therefore potentially insecure) form input which 6.10 does not.

I'm not sure about this, it is just a guess. But I am quite confident that applying this patch is far better than reverting to Drupal 6.9

lsrzj’s picture

Working for me too until now, any other problem I'll report.

lark’s picture

same issue.
Subscribing ...

rezboom’s picture

same problem here - subscribing

patch mentioned in #18 works for me too!

domesticat’s picture

Status: Active » Needs review

Patch working here as well. I'm bumping the status to 'code needs review' in the hopes that someone with more knowledge of the changes in Forms API can speak to whether or not the code contained in the patch is secure. If it is, then this patch should go to RTBC pretty quickly.

fago’s picture

fago’s picture

Status: Needs review » Closed (duplicate)
rentex’s picture

Subscribing. Experiencing same issue.