Hello,

I posted this in a different topic, but that title wasn't very descriptive so I'm trying again. The problem is simple. I want authenticated users to be able to post comments without approval. I checked the appropriate box under access control, but it didn't work. Users' comments are still waiting on approval after being posted. Any ideas?

I had a similar problem once when it ended up that I had some kind of access conflict with the taxonomy access module. (That is, it was my fault for arranging permissions that way, but it was difficult to diagnose).

Can anyone think of similar conflicts that would produce this behavior, or is this an actual bug?

Comments

zwhalen’s picture

I looked through the comment module to see if I could find what was amiss. It seems that it does a role/access check with this following line, where it decides whether to publish the comment or hold it:
$edit['status'] = user_access('post comments without approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED;

I tested this by creating a block that just reports the outcome of this call to user_access, and found that it correctly identified roles able to publish without approval. I can't tell for sure if that happens when the comment module runs, but at least in isolation, this user_access call works correctly.

Still, it seems that comment.module is deciding to assign COMMENT_NOT_PUBLISHED either here or somewhere else along the line.

So should I report this as a bug? I haven't yet because I haven't been able to isolate this within comment.module and I've seen other user access anomalies. I haven't investigated those yet, however.