Disabled roles setting currently relies on role id and is causing some issues with Features exported roles as role id is not guaranteed to be the same on different installations.

CommentFileSizeAuthor
map_roles_using_role_name.patch2.28 KBtuutti

Comments

tuutti created an issue. See original summary.

masipila’s picture

Status: Needs review » Needs work

Hi,

The concept of this patch is justified. However, the patch doesn't apply:

$ git apply -v map_roles_using_role_name.patch
Checking patch simple_fb_connect.admin.inc...
error: while searching for:
  $defaults = variable_get('simple_fb_connect_disabled_roles', array());
  foreach ($roles as $rid => $label) {
    if ($rid > 2) {
      $options[$rid] = check_plain($label);
    }
    if (empty($defaults) && $label == 'administrator') {
      $defaults[$rid] = $rid;
    }
  }
  $form['module_settings']['simple_fb_connect_disabled_roles'] = array(

error: patch failed: simple_fb_connect.admin.inc:81
error: simple_fb_connect.admin.inc: patch does not apply
Checking patch simple_fb_connect.install...
Checking patch simple_fb_connect.module...

Could you please fix the patch. I will then test and commit it.

Cheers,
Markus

tuutti’s picture

Hello,

I tried to apply it against clean 7.x-2.x branch and the patch applied for me.

boot :: http/patches/simple_fb_connect  ‹7.x-2.x*› % git apply -v map_roles_using_role_name.patch 
Checking patch simple_fb_connect.admin.inc...
Checking patch simple_fb_connect.install...
Checking patch simple_fb_connect.module...
Applied patch simple_fb_connect.admin.inc cleanly.
Applied patch simple_fb_connect.install cleanly.
Applied patch simple_fb_connect.module cleanly.

  • masipila committed 82059e9 on 7.x-2.x authored by tuutti
    Issue #2653060 by tuutti: Disabled roles with Features exported roles
    
masipila’s picture

Status: Needs work » Fixed

Whoops, my bad... I had a clean branch but modified it slightly just before trying to apply the patch... doh.

The patch is now committed to dev and will be part of the next stable release.

Thanks for your contribution!

Cheers,
Markus

Status: Fixed » Closed (fixed)

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