Commit graph

136 commits

Author SHA1 Message Date
Sagar Vora
b3e1eda4c8
feat: global frappe.in_test flag (#32960)
* feat: global `frappe.in_test` flag

* feat: helper utility to toggle `frappe.in_test`

* fix: use `toggle_test_mode` util

* fix: use `frappe.in_test`

* chore: add comment explaining global `in_test`

* chore: ignore commit replacing flag usage

* test: temporarily disable `frappe.in_test`

this worked earlier because flag was set in werkzeug.local which was separate for API test client

* test: add comment explaining change
2025-06-17 19:19:31 +05:30
Vengadesh
4659ee2a00 chore: rename field 'show_absolute_datetime_format' to 'show_absolute_datetime_in_timeline' 2025-05-27 22:19:02 +05:30
Vengadesh
77361c1fe8 fix: field spelling updated 2025-05-20 21:00:21 +05:30
Vengadesh
80173e9077 feat: Configurable Timeline Date Format using settings 2025-05-20 20:49:19 +05:30
Sagar Vora
e08efc8a64 perf: use cached user and compile regex 2025-04-18 17:41:42 +05:30
Ankush Menat
dc7636de8f perf: use cached user document 2025-01-14 19:01:31 +05:30
Rutwik Hiwalkar
7b39a9bbd3
feat: add vim and emacs mode for ace-editor (#25936) 2024-04-16 11:35:58 +05:30
Ankush Menat
822679246c fix: use workspace title instead of name
this is how workspaces work 🤷
2024-04-11 19:42:48 +05:30
Corentin Flr
3ec47b0975
feat(workspace): Allow user to choose a default workspace 2024-03-06 11:15:53 +01:00
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
barredterra
51743e5952 feat: frapp.model.can_submit (JS) 2024-02-09 16:19:12 +01:00
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Ankush Menat
1b406edd54 feat: Desk User role 2023-08-28 22:31:23 +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
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Maharshi Patel
10628b9b06 feat: add onboarding and status on boot
Add List of all onboarding tours to frappe.boot and onboarding status on frappe.boot.user
2023-05-18 02:33:40 +05:30
Ankush Menat
8446875257
refactor!: Remove "Set user permission" permtype (#20090)
This has never worked and setting user permission requires system
manager role always (because of permissions on list view)
2023-02-20 16:07:49 +05:30
Ankush Menat
48869d506f perf: dont order by for uniq searches 2022-08-21 17:37:40 +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
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
b99cd7ab3b refactor: frappe.utils.user
* Refactored raw SQLs and outdated APIs to use newer DB + QB APIs
* Simplified Python & Query logic
* Added type hints
* Styled with Black
2022-03-31 16:19:27 +05:30
Gavin D'souza
459c179916 refactor(utils): Use qb & db APIs inplace of raw SQls 2022-03-30 17:59:22 +05:30
barredterra
745297a49d refactor: a not in b
Search: if not ([\w\d]*?) in ([\w\d]*?)
Replace: if $1 not in $2
2022-02-21 19:54:34 +01:00
Rushabh Mehta
853287f49d fix: load user_info on-demand 2022-01-13 16:39:24 +05:30
Aradhya-Tripathi
18fd175c7c fix: fixed erroneous query 2021-11-08 16:04:37 +05:30
Aradhya-Tripathi
241104bf6e refactor: Converted query in user.py 2021-11-08 15:57:39 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
b94d5778a8 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2021-01-19 10:36:50 +05:30
Saurabh
97b693c6b0
feat: Added permission to grant only Select access to document (#12063)
* feat: add permtype 'select' to DocPerm and CustomDocPerm

* feat: add 'select' perm in rights tupple

* feat: provisions to handle select permission

* feat: toggle href based on permissions

* feat: pass permission type explicitly while validating link in permission check

* fix: sider

* feat: added test cases to validate select perm

* feat: add method frappe.only_has_select_perm to explicitly check the select perm

* fix: if user only has select perm then do not show anchor tag for link fields

* fix: sider
2020-12-29 16:58:28 +05:30
Shivam Mishra
9e39a7464a Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-10-21 11:55:13 +05:30
Rucha Mahabal
7c4ce7b6e7 fix: First Response Time not getting set when sender is Administrator 2020-10-12 13:46:24 +05:30
Shivam Mishra
c89b6a7065 feat: added magic switcher 2020-07-27 19:08:01 +05:30
Shridhar Patil
9827606f9a
[fix]: Query fixes for postgres (#9549) 2020-02-26 07:20:57 +00:00
Shivam Mishra
c9c4cbd6d1 perf: Speed improvements for moduleview get (#9079)
* feat: api to setup boot cache on login

* feat (perf): use cache data instead of query

* feat: added doc hooks for rebuilding cache

* feat: improved can import query

* fix: ignore cache rebuild for import or install

* fix: fix postgres syntax error

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-24 13:12:57 +05:30
Suraj Shetty
642d69b592 fix: Cache can_import list for all users and not just System Managers 2019-11-15 17:08:46 +05:30
Aditya Hase
e3df3f0b17
perf(desk): Use cached meta 2019-10-23 22:21:49 +05:30
marination
e08779c362 fix: Importable docs via Customize Form set in redis cache
can_import list is set in redis cache
Data Import's set query will fetch from cache ad update list
2019-10-09 12:36:35 +05:30
marination
3e8ca0dd8d feat: Added 'Allow Import (via Data Import Tool)' checkbox in Customize Form
Checkbox will let users enable DocTypes in Data Import
Document Type Link Field in Data Import will fetch Importable DocTypes from meta
2019-09-27 13:08:33 +05:30
Shivam Mishra
7104686a15 refactor: remove background_style 2019-08-09 13:16:18 +05:30
Shivam Mishra
4492dbfc38 refactor: remove code related to background image 2019-08-09 10:42:03 +05:30
deepeshgarg007
f5a983a70d fix: Remove limits and usage info from frappe 2019-06-30 16:51:05 +05:30
Nabin Hait
b375ee9eef fix: merge conflict 2019-06-18 18:45:21 +05:30
Sahil Khan
42fc641fd9 feat(sync_site): sync site via central agent 2019-05-09 14:22:47 +05:30
Rushabh Mehta
5ebf688984 fix(recent): complete uncommitted changes 2019-05-03 08:49:51 +05:30
Rushabh Mehta
7402f495d5 feat: Milestone Tracker. Track document lifecycle with milestones 2019-04-17 18:00:03 +05:30
Sahil Khan
39660d6bd1 fix: get_system_manager 2019-04-12 01:43:18 +05:30
Suraj Shetty
aee7c67f8b refactor: Move get_users_with_role to utils.user 2019-03-21 21:06:54 +05:30
Suraj Shetty
00ed1a0f1a Merge branch 'develop' of https://github.com/frappe/frappe into energy_point_new 2019-03-21 15:38:09 +05:30
Saurabh
6d9fa54f0b Merge branch 'master' into develop 2019-03-20 14:30:48 +05:30