I'm not sure why, but I go to my content type and allow one role to view any content - that's the only thing checked off. I also allow per content access control settings. I create a content page with just a title and body (no fields) and also only allow the same role to view any content. It seems that I can view this page as anonymous or as other roles and no access control is being performed. Have I missed something? Thank you.

Comments

fago’s picture

Hm, you allow only one role to access - so anonymous shouldn't have access? Does it work when you disable "per content node settings" ?

rmassamiri’s picture

Sorry about the 3 posts - I'm not sure what was happening...

That's correct. Anonymous *and* the other roles should not have access. It does not make a difference when I disable "per content node settings". What I'm trying to do is create a Navigation Menu item called "Subscriptions" that only shows up for the role that is authorized as the subscriber. I thought I could use content access to accomplish this by doing as described in the original post.

Thank you.

Garrett Albright’s picture

I'm having similar problems.

First, with the "access content" permission granted to anonymous users, I went to a content type I want to restrict from anonymous users and unchecked the "view content" box for the anonymous role. But this didn't stop them from being visible to anonymous users. So I approached the problem from the opposite end, ungranting "access content," then going to the content types I do want visible to anonymous users and checking the "view content" box for those content types - or, at least, that was the plan, but those check boxes are disabled if I try to do it that way. Rats…

fago’s picture

Title: Not Working » removing access for anonymous users

hm, I just tested removing access for anonymous users for a whole content type - it works fine for me. Also it's reflected right for the menu item.

So if you still have problems, please report whether the problem occurs on
1) content type level
2) per content node level with content type defaults
3) per content node level with custom settings

Also report if you are using any other access control modules and your content access module version.

Garrett Albright’s picture

Other access control modules? Shoot, I didn't think to consider those… I am using Domain Access. I know that permission granting is an OR thingie rather than an AND thingie, so likely that's what's going on here.

Ken Rickard, the creator of Domain Access (and Organic Groups), has submitted a patch for D7 which will hopefully make it into core which will solve issues like this.

Looks like my options are 1) go without Domain Access (not going to happen), 2) patch core (not ideal), or 3) toss together a custom module which uses hook_nodeapi() to check $node->type and $user and toss a drupal_access_denied() if things aren't kosher (not ideal, but less not ideal than patching core).

tmvijai’s picture

I just added the module and configure it with default "anonymus" and "auth user". Then I went to the page and changed to have only for "auth user" and it still shows that page for anonmyus user. Why it is not denying access.

lesliewu’s picture

I have the same problem. When I uncheck view all content and view own content for anon, the content is still shown.

niallhatton’s picture

I am having same issue.

jmstacey’s picture

Running into the same issue as well.

Edit: We're not using any other node access modules unless organic groups would be considered as such.

jmstacey’s picture

After further research I have found the culprit in our situation: Organic Group access control. Disabling that module solved the problem. I also discovered that changing the advanced setting "give node grants priority" to something greater than 0 with OG access control enabled will fix the problem. Unlike the menu system where a negative number will visually give higher priority, it appears that it's the opposite in this case.

GreyHawk’s picture

Same issue also being described here; appears to be a recurrence under 6.x-1.0, as earlier Drupal versions are working ok.

quentusrex’s picture

I have the same issue and I'm not using any other modules. When I remove access from a blog post from anonymous, when the page refreshes anonymous has FULL rights. READ/WRITE/DELETE.

Please advise. I have had to remove all content access from anonymous...

grobemo’s picture

Status: Active » Closed (duplicate)

There's a patch available at http://drupal.org/node/384916.

endiku’s picture

@#10
This was the case for me and changing the grants priority to 10 solved the issue. Otherwise I was having the similar issue where it seemed that my removal of viewing permissions to anonymous users was being "ignored". Seems fairly straight forward now. Thanks for the feedback jmstacey.

tomsherlock’s picture

@Garrett Albright, i was considering your last option since the private module does not check for anonymous user. But the Content Access module was mentioned in the private module queue, so i thought i'd have a look here first.