Commit graph

2314 commits

Author SHA1 Message Date
Ankush Menat
e1f2f4bb54 fix: Let social login key control signups
There are cases where certain social login keys

- Should not allow signups at all and only allow logins. E.g. social media login keys.
- Should allow signups even if global sign ups are disabled. e.g. internal SSO like setups.
2023-10-14 12:43:48 +05:30
Shariq Ansari
009d9e010b
Merge pull request #22679 from shariquerik/conditional-webform-list-view 2023-10-10 15:47:27 +05:30
Shariq Ansari
46f3b5b12d fix: changed table style to match grid style
updated description and some minor fixes
2023-10-10 12:53:21 +05:30
Shariq Ansari
fb9c111ed2 fix: conditional webform with list view enabled 2023-10-10 11:47:03 +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
Ankush Menat
4122eba784 fix: Add crossorigin for preload
If crossorigin isn't specified browsers don't seem to use it.
2023-09-23 17:34:48 +05:30
Ankush Menat
428d78a491 chore: move svg icons to end and correct version 2023-09-23 15:17:05 +05:30
Ankush Menat
d7a9d0111c
perf: lazy load SVG icons (#22517)
| Metric                             | Before | After | Change    |
| ---                                | ---    | ---   | ---       |
| app.html first response size       | 421kb  | 106kb | -75% (!)  |
| First response duration            | 60ms   | 40ms  | -33%      |

huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
2023-09-23 15:13:43 +05:30
Ankush Menat
8779be9b49
fix: propogate correct HTTP status code (#22450) 2023-09-18 10:30:12 +00:00
Gursheen Kaur Anand
e03525efba
fix: remove items linked to non-existing doctypes from portal settings (#22417)
* fix: remove non-existing ref doctypes from portal settings

* fix: use separate list to iterate
2023-09-15 15:06:51 +05:30
Suraj Shetty
2587d3e2e0
perf: Enqueue "removing of index" on web page save (#22409)
* perf: Enqueue "removing of index" on web page save

* fix: Enqueue after commit

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* fix: enqueue after commit

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-09-14 14:58:19 +05:30
Ankush Menat
b445c20e22
test: ignore whitespace changes while comparing HTML (#22386) 2023-09-13 08:18:56 +00:00
mergify[bot]
1f810c14a8
fix: convert category tojson (#22342) (#22343)
(cherry picked from commit 91c4a9571da5255186c26b78b5b21800f758055f)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-10 17:08:29 +05:30
Raffael Meyer
1dcf1d1f4b
Merge pull request #21874 from blaggacao/fix-website-asset-discovery 2023-08-29 19:23:55 +02:00
Ankush Menat
dc8d7b019a refactor!: Lower roles from All To Desk User 2023-08-29 12:07:57 +05:30
Corentin Forler
1c64334916 fix(webform): Retrieve layout fields too 2023-08-24 16:08:54 +02:00
David Arnold
414febab96
fix(test): ensure tests construe the site url from its constructor 2023-08-23 12:04:57 +02:00
Raffael Meyer
6ea739e4cf
refactor(File): explicitly import utils (#22143) 2023-08-23 11:08:22 +05:30
David Arnold
8dabd2bae6
refactor: make the app source accessor explicit
The parent folder of a python module (inside `./site-packages`) can be
`./lib`. Separate code paths that depend on the app source into its own
getter so that patching that function becomes easier in those cases
where the python module is not served from the source checkout.
2023-08-20 01:11:05 +02:00
Suraj Shetty
5d85341984 feat: Hook to add dynamic routes for other web view doctypes 2023-08-17 09:30:24 +05:30
Raffael Meyer
d6dfe6f0fe
fix(Web Form): redirect countdown (#22032) 2023-08-14 13:57:12 +05:30
Ankush Menat
58568115a9
Merge pull request #21955 from barredterra/refactor-with-sourcery
refactor: run sourcery on all files
2023-08-10 10:11:20 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
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
Raffael Meyer
c3aaab3447
fix(Web Form): translation of forwarding message (#21948) 2023-08-08 11:05:42 +05:30
Jannat Patel
49a9f53d24
feat: text editor and mentions for discussions (#21886) 2023-08-07 20:23:53 +05:30
Sagar Vora
e588f2d70b
Merge pull request #21928 from resilient-tech/fix-rate-limiter 2023-08-05 17:38:08 +00:00
Sagar Vora
2b96324c31
fix: rate limit for all HTTP methods (#21929) 2023-08-05 22:32:55 +05:30
Sagar Vora
773cefea69 test: specify args or kwargs instead of frappe.form_dict 2023-08-05 14:14:03 +05:30
Sagar Vora
0cced74766 fix: add rate limiting and type hints for add_feedback 2023-08-05 12:46:31 +05:30
Corentin Forler
d7aea1773f fix(web_form): Allow Jinja extension of header buttons 2023-07-28 18:12:45 +02:00
Ankush Menat
927cd647e4 chore: generate type annotations 2023-07-24 15:32:48 +05:30
Sagar Vora
d2becc7f1d fix: no API call required to set cookie in browser 2023-07-22 17:54:41 +05:30
barredterra
588bbd9d1c fix: include languages when clearing website cache 2023-07-18 12:53:57 +02:00
Gursheen Kaur Anand
149467a71b
fix: fetch portal sidebar items (#21703) 2023-07-18 09:34:52 +05:30
Ankush Menat
b5409f6f07 chore: remove eslint-disable* 2023-07-14 15:41:20 +05:30
Ankush Menat
58cf770760 fix: All ESLint errors 2023-07-14 15:25:48 +05:30
Ankush Menat
be8d2b9de0 perf: lazy websocket connection on website
Establishing 1 connection for every website visit is too much.

Only after calling frappe.realtime.on(...) for ANY event, we will
establish a websocket connection.

This is used for handful of things:
- Discussion component
- File upload

Socketio was initially added here: https://github.com/frappe/frappe/pull/6866 this use case no longer exists.

Rarely anywhere website uses realtime.
2023-07-01 12:43:53 +05:30
Ankush Menat
e4ec6e65ee fix: socketio namespace on website 2023-07-01 12:43:53 +05:30
Corentin Flr
4ccfd1e8fa
Merge branch 'frappe:develop' into fix-test_never_render 2023-06-30 11:52:33 +02:00
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
Ankush Menat
38f08bb695
Merge branch 'develop' into fix-test_never_render 2023-06-28 11:41:51 +05:30
Hussain Nagaria
b9bd055813 fix(WebForm): auto-increment link field 2023-06-27 17:10:46 +05:30
Ankush Menat
8a83226c60 perf: defer GoogleOAuth import 2023-06-24 15:22:01 +05:30
Corentin Flr
23846434ee
fix(path_resolver): Avoid 200 OK for NotFoundPage renderer 2023-06-16 14:39:03 +02:00
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
3005e66e45 refactor!: Drop previously deprecated code 2023-06-13 16:00:43 +05:30
Ankush Menat
8485ac5d62 build(deps): bump many dependencies
test: change code to adapt to new werkzeug client

fix: avoid setting charset

utf8 is default and assumed now by werkzeug, setting this manually is
deprecated.

fix: use string instead of bytes for setting headers

DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
12:23:34 web.1         |   response.headers["X-Page-Name"] = path.encode("ascii", errors="xmlcharrefreplace")
2023-06-10 20:47:27 +05:30
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30