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

stock tab not available on product edit page #30

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

stock tab not available on product edit page #30

nimish13 opened this issue Jul 10, 2017 · 0 comments

Comments

@nimish13
Copy link

Title

Stock Tab is not available on product edit page

Description

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.

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