New user can't see my custom module

edited October 2011 in Bug Reports
I've been scouring the forums and I still can't figure out why the new user I created can't see my custom module called "Gallery".

Here's what I have in the "MY_FUEL_Modules.php" file:

$config['modules']['gallery'] = array( 'module_name' => 'Gallery', 'instructions' => 'Here you can manage the gallery images', 'sanitize_images' => TRUE, 'model_name' => 'galleryImages_model', 'permission' => 'Gallery' );

If I go into the permission section of the admin, I created a permission called "Manage gallery". If i give my new user this permission, they still don't see the "Gallery" module on the left hand navigation. What am I missing?

Comments

  • edited 5:01AM
    Try setting the permission name to just "gallery" and the description can be "Manage gallery"
  • edited 5:01AM
    Still can't see it with my new user.
  • edited 5:01AM
    Hmm... it sounds like you are doing things correctly.

    If you log in that new user and print out the value of $this->fuel_auth->get_permissions() do you see that permission associated with that user?

    The left menu is generated in the fuel/modules/fuel/views/_blocks/fuel_header.php file and around line 60 or so it does a permission check using the has_permission method on Fuel_auth:
    if (($this->fuel_auth->has_permission($key)) || $key == 'dashboard')
  • edited 5:01AM
    Around line 60 I did this

    if (($this->fuel_auth->has_permission($key)) || $key == 'dashboard') { echo 'key = '.$key; } else { echo 'bad key ='.$key; }

    it prints out "bad key = gallery".
  • edited 5:01AM
    What does it looks like if you print_r($this->fuel_auth->get_permissions())?
  • edited 5:01AM
    I figured it out. I just had to name the permission "gallery" instead of "Manage gallery".

    The reason I used "Manage gallery" is because when setting up a permission, if you hover over the name label it says something about using the word "Manage" for things to appear in the left nav. Can you explain that to me in more detail?
  • edited 5:01AM
    That's a bug. It's an old comment left in the table definition which doesn't apply anymore. Sorry for the confusion there... may have saved you some time.
Sign In or Register to comment.