Active
Project:
Manager
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
14 Jun 2010 at 20:04 UTC
Updated:
10 Aug 2010 at 12:59 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 827274.patch | 2.05 KB | barraponto |
Comments
Comment #1
barrapontoI 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.
Comment #2
franzalternatively, we could create permissions automatically for managing each node type.
Comment #3
franzThat would be a kind of a noise, but we need this ASAP, before we can finally get a stable version