Kaushal Shriwas
57854698ce
fix: prevent portal list pages from being cached
2026-03-28 00:33:55 +05:30
stravo1@mac
9dcaab96ee
fix(website_404): skip caching 404 for pages with permission checks
2026-02-16 23:41:32 +05:30
stravo1@mac
a534936726
Revert "fix(website_404): cache website 404 results wrt to users"
...
This reverts commit 697978c8f3 .
2026-02-16 22:15:01 +05:30
stravo1@mac
697978c8f3
fix(website_404): cache website 404 results wrt to users
...
fixes #37007
2026-02-13 21:37:57 +05:30
sokumon
dd2dc053ca
chore: more renames to /desk
2025-12-18 20:45:04 +05:30
Sagar Vora
e51ca57097
fix: reduce query and improve logic
2025-12-16 19:20:27 +05:30
sokumon
d3d67cd62c
fix: bring back list renderer
2025-12-16 18:26:46 +05:30
sokumon
46f6c7481f
feat: introduce /portal
2025-12-15 10:55:33 +05:30
Ankush Menat
02ecb10205
fix!: Remove badly written default portal list views ( #35182 )
...
* fix!: Remove badly written default portal list views
* fix!: Remove guest permissions from web form list endpoint
* test: cleanly terminate gunicorn
int sometimes ends up leaving socket open
2025-12-14 07:11:45 +00:00
sokumon
49714e916f
chore: rename from app to desk
2025-11-14 23:05:13 +05:30
Akhil Narang
a5ed4cf3e7
fix(static_page): ensure that requested files are within app/www
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-10-14 16:58:11 +05:30
Venkatesh M
96e0f49df4
fix: handle None session.data in maintenance mode ( fixes #33258 )
...
- Add null check for session.data in safe_exec.py
- Add null check for session.data in base_template_page.py
- Prevents AttributeError when session.data is None during maintenance mode
2025-07-19 16:02:57 +00:00
Sagar Vora
f4062b4d7a
fix: ensure consistent error in response
2025-02-19 12:10:59 +05:30
Akhil Narang
638b118875
Merge pull request #29123 from akhilnarang/escape-path
...
fix(not_permitted_page): escape path
2025-01-15 16:45:13 +05:30
Ankush Menat
e768f679ff
perf: Speedup rendering of simple templates
...
Also, slowdown rendering of complex ones. Nothing comes free.
2025-01-14 18:11:27 +05:30
Akhil Narang
b8fe835d1a
fix(not_permitted_page): escape path
...
Reported-by: Sadik Shaikh <pc_masters70@yahoo.com>
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-01-13 11:46:05 +05:30
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
Rushabh Mehta
cef8c12ee4
fix(style): fix oauth authorisation page and standardise error responses
2024-10-24 15:21:34 +05:30
Suraj Shetty
d35518639b
feat: Add a field to accept allowed embedding domains
2024-10-18 11:30:11 +05:30
David
1619cc0e58
feat: add cache control
2024-08-30 09:08:42 +02:00
Akhil Narang
26ae0f3460
fix: ruff fixes
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Corentin Flr
c9c8414562
fix(website): Handle virtual DocTypes webview routing ( #24445 )
...
Co-authored-by: Charles-Henri Decultot <chdecultot@dokos.io>
2024-02-05 12:47:09 +05:30
Ankush Menat
8c515a9a5d
fix: correct perm check for guests
...
Allow viewing document page if doctype allows guest to view
2023-12-29 17:59:39 +05:30
Ankush Menat
38314aec59
fix: Check permissions before rendering web view ( #24032 )
2023-12-29 17:07:17 +05:30
Akhil Narang
44667901bf
feat: allow setting a custom http status code for redirects
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-20 17:36:42 +05:30
Suraj Shetty
7452e71d02
perf: Use get_cached_doc instead of get_doc
...
- Makes document pages with no-cache load a bit faster
2023-12-08 20:55:25 +05:30
18alantom
5722d9c2ba
fix: set sidebar only if not present
...
The get_context of some templates set their own sidebar
if this is done, no need to override
2023-11-29 12:11:34 +05:30
Corentin Forler
443ffa06d5
fix(NotPermittedPage): Add redirect-to even if starting with /app
...
A page like "/appointment" would redirect to /login, but without the redirect-to parameter, which is undesired
2023-09-27 12:16:06 +02:00
Suraj Shetty
5d85341984
feat: Hook to add dynamic routes for other web view doctypes
2023-08-17 09:30:24 +05:30
barredterra
b553ed98d8
refactor: inline immediately returned variable
...
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
Gursheen Kaur Anand
149467a71b
fix: fetch portal sidebar items ( #21703 )
2023-07-18 09:34:52 +05:30
Corentin Flr
69d0060bdf
chore: format code
2023-06-30 11:52:29 +02:00
Ankush Menat
f3c876e43e
chore: ignore pyo files too
2023-06-28 11:43:23 +05:30
Corentin Flr
bcdc483a13
fix(test): Fix test_never_render to get path as string, exclude PYC files from static downloads
...
This test code never actually tested the behaviour for two reasons:
- first, the page had an error which meant that a 500 Error page was returned (because `path` is not a string)
- second, every page contains the string "400" because it's contained in some of the icons.svg icons!
I also found a minor related bug in static_page.py, allowing people to download PYC files (pycache)
2023-06-15 18:36:30 +02:00
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache ( #21282 )
2023-06-08 11:47:17 +05:30
Ankush Menat
392a506a76
perf: Cache published web forms
2023-06-04 15:13:39 +05:30
Ankush Menat
c94c0591c3
perf: cache dynamic web pages
2023-06-04 15:13:39 +05:30
Ankush Menat
7c7c11b454
perf: Cache web view routes
...
Each call to evaluate if route is web view makes N queries where N = #
of web view doctypes. This entire computation can be definitely cached
for short duration.
- Added cache bursting in WebsiteGenerator doctype updates.
- Added 60 minutes TTL in case cache invalidation wasn't done reliably.
2023-06-04 15:13:39 +05:30
Ankush Menat
eb8da5fd59
fix!: Correct resolution order for template page ( #20927 )
...
Current resolution is confusing mess:
1. Evaluation is done in order of installed app, first install wins
2. Except frappe, frappe is treated as lowest priority.
Following same principle of "last write wins" everywhere similar to
previous PRs:
- https://github.com/frappe/frappe/pull/17869
- https://github.com/frappe/frappe/pull/20648
- https://github.com/frappe/frappe/pull/19653
Closes https://github.com/frappe/frappe/issues/20377
2023-05-07 13:19:23 +05:30
gavin
cd524135c0
fix: TemplatePage.can_render ( #20257 )
...
Don't render python executable/loadable files from TemplatePage
renderer. This restricts access to reading/downloading possibly
private Python source code from Frappe applications
2023-03-06 12:40:15 +05:30
mergify[bot]
3a130abfc5
fix: extension extracted if at least one dot, because if not dot ( #19946 ) ( #20142 )
...
(cherry picked from commit 53c41e0ce6bf9985786a570c43fd32c79332c44c)
Co-authored-by: Jaime <developmentforpeople@gmail.com>
2023-02-23 15:03:11 +05:30
Shariq Ansari
abc5b51e57
fix: after login if redirect is used getting blank screen
2023-01-05 20:39:35 +05:30
PeterG
4ec7d2dbba
feat(minor): redirect after login from NotPermittedPage ( #18946 )
...
* redirect after login from NotPermittedPage
2022-11-21 14:56:18 +05:30
Ankush Menat
cc72dc47ab
fix: Show error page even when routing fails ( #18437 )
2022-10-17 19:52:37 +05:30
Ankush Menat
786df3fbeb
perf: ~33% faster Desk response
...
- hardcode `/app` resolution
- use cached website settings everywhere. It was mixing cache and DB
everywhere and re-quering same thing (why ?)
2022-08-21 17:35:07 +05:30
Shariq Ansari
a50e0ffa08
refactor: Webform ( #17232 )
2022-07-19 15:52:15 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features ( #17367 )
...
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Suraj Shetty
1431cb26d3
fix: Catch any expection and show proper error page
...
- Also, show title & message if it is defined in the exception class
2022-06-01 08:08:52 +05:30
Suraj Shetty
d23b293e1e
fix(webform): Only show published web forms
2022-05-09 19:22:13 +05:30