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

fix: Ignore Customer Group Perm on All Products page #25396

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

marination
Copy link
Collaborator

@marination marination commented Apr 19, 2021

Issue:

  • While not logged in, if a user tries to go to the /all-products page it throws a permission error on Customer Group
  • This happens precisely due to frappe.db.get_list that is used to just fetch the root customer group while getting pricing rules, nothing critical.
  • It checks for permissions. Everywhere else we haven't used ORM which isn't interfering with fetching basic things
    cart-perm-issue

Fix:

  • frappe.db.get_list is used due to the nature of the query (checking where parent_field is not set, more convenient with ORM)
  • Let that be, ignore_permissions in it
  • Product listing will be visible, while trying to add to cart user is redirected to login page
    cart-perm-fix

@marination marination changed the title fix: Ignore Customer Group Perm on AlL Products page fix: Ignore Customer Group Perm on All Products page Apr 19, 2021
@nabinhait nabinhait merged commit b91fcbd into frappe:develop Apr 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants