Skip to content

Commit

Permalink
fix: projects website list visible for guests and all logged in custo…
Browse files Browse the repository at this point in the history
…mers (#39164)

* fix: projects website list visible for guests

fix: projects website list visible for guests and all logged in customers

see the issue for details

fixes issue #39009

* fix: remove user = frappe.session.user

(cherry picked from commit eabf706)
  • Loading branch information
0xD0M1M0 authored and mergify[bot] committed Jan 10, 2024
1 parent f00a6f6 commit 40efad8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions erpnext/projects/doctype/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,18 +370,16 @@ def get_timeline_data(doctype: str, name: str) -> dict[int, int]:
def get_project_list(
doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified"
):
user = frappe.session.user
customers, suppliers = get_customers_suppliers("Project", frappe.session.user)

ignore_permissions = False
if is_website_user():
if is_website_user() and frappe.session.user != "Guest":
if not filters:
filters = []

if customers:
filters.append([doctype, "customer", "in", customers])

ignore_permissions = True
ignore_permissions = True

meta = frappe.get_meta(doctype)

Expand Down

0 comments on commit 40efad8

Please sign in to comment.