You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'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
Create a new role lets say 'Configuration Manager'
Add Configuration Management permission set to this role
Create a new user assign Configuration Manager role to him/her
Log in with the newly created user and visit admin end.
Expand Configuration Menu
General Settings submenu won't be visible
Screenshot
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
The text was updated successfully, but these errors were encountered:
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 roleSteps To Replicate
Configuration Management
permission set to this roleConfiguration Manager
role to him/herConfiguration
MenuGeneral Settings
submenu won't be visibleScreenshot
Reason
Permissions title for
can :admin, Spree::Config
andcan :manage, Spree::Config
arecan-admin-#<spree/app_configuration:0x007fc0c643a2e0>s
andcan-manage-#<spree/app_configuration:0x007fc0c643a2e0>s
respectively which are wrongly set.Beacause
Spree::Config
is an object of classSpree::AppConfiguration
when the codeexecutes for
Spree::Config
it returns "#<spree/app_configuration:0x007fc292eb1de0>s" instead ofspree/config
Your Environment
Spree 3-2-stable
Rails 5.0.0
The text was updated successfully, but these errors were encountered: