Even after adding Stock Management and Product Management permissions_set to a role, the stock tab is not visible on product's edit page at admin end.
Steps To Replicate
1) Create a new role lets say 'Product Manager'
2) Add Stock Management and Product Management permissions set to this role
3) Create a new user assign product manager role to him/her
4) Log in with the newly created user and visit any product's edit page, you won't be able to see the 'stock' tab on the right side of the page
5) I also tried to create a new permission with title can-admin-spree/stock and added it to Stock Management permission set but it didn't solve the issue.
Reason
In product_tabs there is a condition which validates whether the current user can admin Spree::Stock.
Now Spree::Stock is a module for which the condition in find_action_and_subject method in permission.rb module returns false due to which current_user is not able to access this stock tab.
Title
Stock Tab is not available on product edit page
Description
Even after adding
Stock Management
andProduct Management
permissions_set to a role, the stock tab is not visible on product's edit page at admin end.Steps To Replicate
1) Create a new role lets say 'Product Manager' 2) Add
Stock Management
andProduct Management
permissions set to this role 3) Create a new user assignproduct manager
role to him/her 4) Log in with the newly created user and visit any product's edit page, you won't be able to see the 'stock' tab on the right side of the page 5) I also tried to create a new permission with titlecan-admin-spree/stock
and added it toStock Management
permission set but it didn't solve the issue.Reason
In product_tabs there is a condition which validates whether the current user can admin
Spree::Stock
. NowSpree::Stock
is a module for which the condition infind_action_and_subject
method in permission.rb module returns false due to which current_user is not able to access this stock tab.Your Environment
Spree 3-2-stable Rails 5.0.0