Usually, node permissions can be retrieved through user_access("edit any $nodetype content"), yet there are contrib modules out there that store their permissions differently. Latest code tries node_access('update', $nodetype), yet the function will only accept nodetype as its second argument for the 'create' operation.

CommentFileSizeAuthor
#1 827274.patch2.05 KBbarraponto

Comments

barraponto’s picture

StatusFileSize
new2.05 KB

I have reverted to user_access('edit any ' . $nodetype . ' content') where it applies, then added needed conditions to support faq module:
if $nodetype == 'faq' && user_access('edit faq'))

Yet it is not abstract enough, and won't support other non-standard contributed modules. I suggest a helper function, since this list will potentially grow, and the view will not be automatically updated.

franz’s picture

alternatively, we could create permissions automatically for managing each node type.

franz’s picture

Priority: Normal » Critical

That would be a kind of a noise, but we need this ASAP, before we can finally get a stable version