Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general settings sub-tab not visible in configuration sub-menu #31

Open
nimish13 opened this issue Jul 10, 2017 · 0 comments
Open

general settings sub-tab not visible in configuration sub-menu #31

nimish13 opened this issue Jul 10, 2017 · 0 comments

Comments

@nimish13
Copy link

Title

'General Settings' tab in submenu of 'Configuration' tab is not visible

Description

At Admin End 'General Settings' tab in submenu of 'Configuration' tab is not visible even if Configuration Management permissions set is added to a role

Steps To Replicate

  1. Create a new role lets say 'Configuration Manager'
  2. Add Configuration Management permission set to this role
  3. Create a new user assign Configuration Manager role to him/her
  4. Log in with the newly created user and visit admin end.
  5. Expand Configuration Menu
  6. General Settings submenu won't be visible

Screenshot

wrong_permission_title

Reason

Permissions title for
can :admin, Spree::Config and can :manage, Spree::Config are
can-admin-#<spree/app_configuration:0x007fc0c643a2e0>s and
can-manage-#<spree/app_configuration:0x007fc0c643a2e0>s respectively which are wrongly set.
Beacause Spree::Config is an object of class Spree::AppConfiguration when the code

   def build_permission_group(permission_list)
      group = {}
      permission_list.each_slice(2) do |permissions, resource_class|
        group[resource_class.to_s.underscore.pluralize] = permissions
      end
      group
    end

executes for Spree::Config it returns "#<spree/app_configuration:0x007fc292eb1de0>s" instead of spree/config

Your Environment

Spree 3-2-stable
Rails 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant