I have all working fine before install OG User Roles. But I want to make a default role for the registered user by invitation.

So, the Drupal admin can do everything, the Client (created by the Drupal admin) can create groups, projects, cases and invite new users. The invited users by the Client can only post cases and comments.

When I install OG User Roles now nobody can create Cases, the Drupal admin, the client or the new default user.

I got this error after submit the new case:

* warning: Invalid argument supplied for foreach() in /home/#####/domains/mydomain.com/html/modules/og_user_roles/og_user_roles.module on line 1613.
* You do not have permission to post this content type (casetracker_basic_case) into Group: mygroup (1)

My ease solution is to make new registers with moderation by the Drupal admin, so he can assign the role manually, but would be nice make this automatic.

Thanks in advance

PD: I'm new with Drupal and the Forum and I don't know if this is the right place to this topic.

Comments

attiks’s picture

Just updated my site and I ran into the same problem, looks like the permissions aren't loaded and all access is denied. Is it working when you assign the roles manually?

Attiks - graphic design and web applications

attiks’s picture

Problem is situated in casetracker_basic.module

If you add the following code everything should be working

function casetracker_basic_project_perm() {
  return casetracker_basic_perm();
}

function casetracker_basic_case_perm() {
  return casetracker_basic_perm();
}

Attiks - graphic design and web applications

attiks’s picture

somebodysysop’s picture

                // Get the module
                $module = node_get_types('module', $type); // Node type is: casetracker_basic_case
				// Get all permissions for this module
                $perms = module_invoke($module, 'perm');
				// Look for the 'create' permission
				foreach ($perms as $string) { // this is line 1613

We are trying to get the permissions that the module says allows you to create this node type.

Apparently, $perms = module_invoke($module, 'perm') does not return anything for casetracker_basic_case.module.

So, what we need is to know how to get the module's permissions so we can figure out whether someone can post to it or not.