ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

member group issue

November 19, 2012 7:24pm

Subscribe [3]
  • #1 / Nov 19, 2012 7:24pm

    FlyDuo

    25 posts

    Hi,

    We’re launching our second EE website. It’s an online store.

    We’ve created about 3 different member groups along with the other default groups that EE comes installed with. The problem we’re having is: When we set the permissions for 1 member group then save it the permissions for all of the other 2 member groups channel access assignments are reset to “no” so that those groups can no longer edit their channels. We’ve set and then reset them multiple times. I’m not sure if we’re doing something incorrectly because we’re still new to EE or if it’s a bug of some sort.

    When a user of the other groups that are reset attempts to edit channel entries or create new entries they get this warning: You are not authorized to perform this action

    The site is currently set to: Is system: OFF - we’ve set the user groups to be able to see the site content when system is off. We’ve also created a custom page for the system off page that’s acting as the domains landing page until the site goes live later this week. The site’s time sensitive as a launch is planned in a few days. The editors are having issues editing content and adding the needed content as well.


    EE ver: v2.5.3 - Build Date: 20120911
    3rd party installed modules: CartThrob

    The domain: ShopKinkyGreen.com - (*This is an adult oriented products store, but there is NO explicit content or imagery on this site/domain.)

    I hope I’ve included enough information.

    If needed I can create a temp account within one of the groups so you can access the site/control panel.

    Thanks,
    Reuben

     

  • #2 / Nov 20, 2012 2:40pm

    tunnel7

    125 posts

    I am having a similar issue as well.  I have and editor group and a restricted editor group.  Originally I had just the editor group and created the restricted editor group based on it.  When I did that the editor group was unable to login and was getting a: You are not authorized to access this page upon login. 

    No matter what I try I can only get one or the other to work, but not both at the same time.  Tried recreating the restricted editor group from scratch but if I change that group it affects the editor group and removes their permissions (channel and module) and they are unable to login.  Same thing happens the other way.

    Any advice you have would be appreciated.

    (Am using v2.5.3 - Build Date: 20120911)

  • #3 / Nov 20, 2012 2:48pm

    leeaston

    634 posts

  • #4 / Nov 21, 2012 12:28pm

    Dan Decker

    7338 posts

    Hi Reuben, Derek, Lee…

    Lee is right, that Bug is what has gotten you. There is a solution provided in the report:
    Open system/expressionengine/controllers/cp/members.php and find this code on line 2166:

    if ( ! empty($channel_ids))
    {
        $this->db->where_in('channel_id', $channel_ids);
        $this->db->delete('channel_member_groups');
    }
    if ( ! empty($module_ids))
    {
        $this->db->where_in('module_id', $module_ids);
        $this->db->delete('module_member_groups');
    }
    if ( ! empty($template_ids))
    {
        $this->db->where_in('template_group_id', $template_ids);
        $this->db->delete('template_member_groups');
    }


    And REPLACE it with this:

    if ( ! empty($channel_ids))
    {
        $this->db->where('group_id', $group_id);
        $this->db->where_in('channel_id', $channel_ids);
        $this->db->delete('channel_member_groups');
    }
    if ( ! empty($module_ids))
    {
        $this->db->where('group_id', $group_id);
        $this->db->where_in('module_id', $module_ids);
        $this->db->delete('module_member_groups');
    }
    if ( ! empty($template_ids))
    {
        $this->db->where('group_id', $group_id);
        $this->db->where_in('template_group_id', $template_ids);
        $this->db->delete('template_member_groups');
    }

    Cheers,

  • #5 / Nov 21, 2012 4:13pm

    FlyDuo

    25 posts

    Thanks for this fix. Was able to apply it and it looks like it works great.

    Thank you all for your help!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases