Hello, I have used this module on my website and I found a problem, in the user profiles I can`t see "Skip blog approvals" checkbox. I found solution: in line 231
if (user_access('create '. $node->type .' content', $account)) {
should be replaced with
if ((user_access('create '. $node->type .' content', $account)) || (user_access('create '. $node->type .' entries', $account))) {
because we have 'create article content', but 'create blog entries'.

CommentFileSizeAuthor
#4 skip-approval.patch1.45 KBrschwab
#2 skip-approval.patch2.16 KBrschwab

Comments

GDI’s picture

Title: Don`t showing "Skip blog approvals" in user accounts » Don`t shows "Skip blog approvals" in user accounts
Status: Active » Needs review
rschwab’s picture

Title: Don`t shows "Skip blog approvals" in user accounts » Some content types not shown on account page
Assigned: Unassigned » rschwab
StatusFileSize
new2.16 KB

This happens not only for blog entries but for contributed module content types that don't follow the Node module's permission style. For example, the chatroom module has a permission to "create chat rooms", and hence gets left out of the account screen.

In this patch I removed the access check for creating content altogether. It seems more important that all content types are represented than to have that safety net for site builders that don't properly set their permissions (ie giving permission to approve comments on content types the role can't even create).

I've also included the changes from the patch at #980026: "Skip $node->type approvals" should be "Skip $node->name approvals" here, for simplicities sake.

rschwab’s picture

#2 is a regression, so to fix I'll use node_access instead of user_access. Will patch and commit once I figure out which branch we're working from.

rschwab’s picture

StatusFileSize
new1.45 KB

This patch changes the access check to use node_access() in order to correctly query the permission for each node type, and also implements the patch at #980026: "Skip $node->type approvals" should be "Skip $node->name approvals"

rschwab’s picture

Status: Needs review » Fixed

Committed #4 to 2.x-dev.

Status: Fixed » Closed (fixed)

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