Jump to:
| Project: | OG User Roles |
| Version: | 5.x-3.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
First of all, kudos to the developers/maintainers, this module meets my needs quite well; I've just run into a small issue.
The following error message appears when I attempt to edit a poll for my group:
"You do not have permission to edit or delete this content type (poll) in Group..."
I'm logged in as user 1 and am still unable to edit group polls (or any other poll for that matter), but I can create and delete them. For all other users, I no longer have an Edit option for polls. Polls appear to be the only content type affected.
I've rebuilt permissions with no luck.
This looks like the same issue found here http://drupal.org/node/329058 but the patch provided fails for 5.x-3.7. Does anyone have an idea how this can be resolved or is there another patch I've missed? FYI - I'm running Drupal 5.18
I appreciate the help.
Comments
#1
Does anyone have an idea as to what could cause this? I'd appreciate any feedback.
Thank you.
#2
Same problem here. Able to delete the node, but not edit it. It's saying
You do not have permission to edit or delete this content type (<type>) in Group: <groupname> (<groupnid>)I'm running Drupal 5.19 and OG User Roles 3.7
#3
With the rise of the rewritten OGUR 4.x for Drupal 6, in which many unrelated features of OGUR were removed, and nearing a release of Drupal 7, I'm closing down old issues.
#4
To get ours to work I did this:
I redid the og_user_roles_perm:
// altered to allow for OG USER ROLES and POLLS to work together
function og_user_roles_perm($type = '') {
$perms = array();
if ($type == '') {
$perms = array('administer og_user_roles', 'configure member roles', 'create og_subgroups', 'manage registration codes', 'use registration codes', 'no oguseredit');
}
$content_types = node_get_types();
foreach ($content_types as $name => $obj) {
if ($obj->module != 'node') {
$new_perms = module_invoke($obj->module, 'perm');
foreach ($new_perms as $string) {
if ((($type == '')) || (($type == $name))) {
if ((!preg_match('/edit/', $string)) && (!preg_match('/manage/', $string))) {
// add in a permission befitting this for the purpose of og_user_roles
$perms[] = 'manage '.$name.' content';
}
}
}
}
}
$perms = array_unique($perms);
return $perms;
}
ca. line 1784 (after
$module = node_get_types('module', $type);)// altered to allow for OG USER ROLES and POLLS to work together$perms = array_unique(array_merge(og_user_roles_perm($type), module_invoke($module, 'perm')));
Lastly, I went into the User Access and added the appropriate privileges.
All the best,
Mike