In the function og_user_roles_ognodeadd() after $type = $_GET['type']; you need to convert the dashes back to underscores otherwise if the content type contains underscores it will not match and you get and Access Denied.

$type = $_GET['type'];

if ($type) {
+ // Convert the dashes in the URL back to underscores.
+ $type = str_replace('-', '_' , $type);
// Got this from node.module (node_access)
// No matter the type, this should return us the create permission.
$module = node_get_types('module', $type);

Comments

somebodysysop’s picture

Status: Active » Fixed

Thanks for the code. Committed to 5.x-3.x-dev release which should be available in the next 13 hours.

Status: Fixed » Closed (fixed)

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