Commit graph

4598 commits

Author SHA1 Message Date
Suraj Shetty
bdb36f4c2d
Merge pull request #17515 from surajshetty3416/fix-inbound-notification-receivers
fix: Do not relay email to standard users
2022-07-14 18:32:45 +05:30
Suraj Shetty
0a41c4051c fix: Do not relay email to standard users
Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
2022-07-14 18:01:47 +05:30
Shariq Ansari
a8f86abbd8
refactor: Replaced blog's feedback with comment's comment_type='Like' (#17479) 2022-07-14 14:09:00 +05:30
Ankush Menat
99d3fe3893 fix(dark theme): background color on version page 2022-07-13 20:30:07 +05:30
uepselon
2791066bb2
fix: allow System Manager to reset OTP secret
* squashed: Change Admin based OTP reset to role based reset (System Manager)

* fix: show `Reset OTP Secret` button only if applicable

* chore: flatten code, use `only_for` API

Co-authored-by: Leonard Goertz <leonard.goertz@noventive.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2022-07-13 19:35:41 +05:30
phot0n
da33f6e6d8 fix: remove fetch-from from user email for used_oauth 2022-07-13 12:05:46 +05:30
phot0n
6d3dfca214 fix: consider oauth usage as well for asking/updating user email password 2022-07-13 12:05:46 +05:30
phot0n
07a577af86 feat: google oauth for google emails
* used unique constraint on email_id in Email Account Doctype
2022-07-13 12:05:46 +05:30
Ritwik Puri
fbb89bdfe9
fix: delete user mention cache when a user is disabled or enabled (#17451)
User Mention cache is deleted on 3 occasions:

* when a new user is inserted
* when allowed_in_mention or user_type value has changed
* when a user is deleted

But we didn't delete it when a user was enabled or disabled as we maintain the mention cache for enabled users
2022-07-12 18:58:07 +05:30
Ankush Menat
111060224b fix: naming series tool doesn't load if missing numbers 2022-07-07 17:38:52 +05:30
Ankush Menat
b5128a35fd
refactor: simplify fetching of readable records (#17417)
- remove encoding, use cstr directly
- remove falsy values by default None, empty string.
2022-07-07 14:40:59 +05:30
Suraj Shetty
d4166dbe20 refactor: Replace html2text with markdownify 2022-07-06 08:23:14 +05:30
Ankush Menat
9a5d11234c
fix: validate scheduler, hook method names (#17400)
* chore: warn about missing scheduler / doc events

* fix: pass list instead of filter

filter can only be iterated upon once

* refactor: many typehints in __init__.py
2022-07-04 19:29:16 +05:30
Ankush Menat
87f77d4e8d
fix: make language, source, translation mandatory (#17396)
Translation doesn't make sense without these three fields
2022-07-04 16:46:06 +05:30
Ankush Menat
60c4819373
refactor: safer binding of outer scope in closures (#17389) 2022-07-04 13:39:56 +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
Ankush Menat
befabac17e
fix: correctly fetch list of users with role (#17363)
fix: correctly fetch user list

`HasRole` table is attached to many doctypes, only User should be
filtered out.
2022-06-30 15:29:32 +05:30
Ankush Menat
61c958c9bb Merge branch 'develop' into migration_failures 2022-06-29 15:33:20 +05:30
Ankush Menat
d35d7ffbe2 fix: remove bare exception catching
A bare except catches lots of things (like generator iteration end) and should never be used.
2022-06-28 18:05:00 +05:30
Shariq Ansari
4dff0d25a3
feat: add email retry limit in system settings (#17259)
**MAX_RETRY_COUNT** for email was hard coded as 3. Added **Email Retry Limit** field in **Email** section in **System Settings** 

<img width="754" alt="image" src="https://user-images.githubusercontent.com/30859809/174769592-97c27a5b-9fea-471f-b596-593de4c5f91f.png">

>no-docs
2022-06-28 10:47:26 +00:00
Ankush Menat
6001864888 fix(UX): show next execution time on scheduled job 2022-06-28 12:27:11 +05:30
Ankush Menat
4bf7cd8210 fix: ignore virtual docfield property conflicts 2022-06-28 12:27:11 +05:30
Shariq Ansari
c6fa8ab090
fix: email not sent if contain file with current site url (#17250) 2022-06-28 11:50:57 +05:30
gavin
0a198621f7
Merge pull request #17320 from gavindsouza/doc-not-found
refactor(minor): get_permissions API
2022-06-27 15:44:28 +05:30
Gavin D'souza
084a1e6c31 refactor: get_permissions
* Show page even if dangling Custom DocPerm records encountered
* Add typing hints
* Cleanup APIs
2022-06-27 15:18:06 +05:30
gruener
1349a73e14
fix: Virtual DocTypes currently breaking Parent-DocType Update and Deletion (#16977)
When you create a Virtual DocType as a Child Table (which is possible without any warning), then it will lead to several errors when updating or deleting of the parent document.

This is because the following files just execute a SQL Statement for the doctype (which doesnt have a DB Table, as this is the nature of a virtual doctype ;-)

**apps/frappe/frappe/model/document.py**
```py
frappe.db.sql("""delete from `tab{0}` where parent=%s and parenttype=%s and parentfield=%s""".format(df.options), (self.name, self.doctype, fieldname))
```

**apps/frappe/frappe/model/delete_doc.py**
```py
frappe.db.sql(
	"delete from `tab%s` where parenttype=%s and parent = %s" % (t, "%s", "%s"), (doctype, name)
)
```

So at these points, I added a check to not perform any sql command for virtual doctypes. With these changes, my affected situation is solved. Perhaps there are other situations, I didn't encounter yet.

As an additional feature, those virtual doctype models should also get an information about the parent is deleted, to propagate the deletion to the remote data pools; but for now I hope this bugfix can be approved.
2022-06-23 11:38:29 +00:00
Deepesh Garg
c6d5c6bbe2 fix: Migration failures for version-13 to develop 2022-06-21 21:12:38 +05:30
Suraj Shetty
5db7716df2
Merge pull request #17223 from frappe/rpm_typo 2022-06-16 16:20:27 +05:30
Michelle Alva
86f9465432
chore: typo 2022-06-16 16:16:00 +05:30
Suraj Shetty
444c2db1c4
Merge pull request #17124 from s-aga-r/fix/user-type 2022-06-15 16:13:31 +05:30
Ankush Menat
b36bf64261
chore: revert naming to default (#17194) 2022-06-15 13:35:21 +05:30
Ankush Menat
8a7458ac57 feat(ux): show log retention policy in sidebar
for discoverablity
2022-06-15 12:33:17 +05:30
Ankush Menat
c380d4a1b8 refactor: dont delete route history by default
It can still be added to log settings manually.
2022-06-15 12:33:17 +05:30
Ankush Menat
a1fa2353c1 fix: clear pending logs using big-deletes
If some sites have long pending old data that doesn't get cleared
automcatically then this patch now attempts to discard old data by using
"big-delete" code instead of typical delete query.
2022-06-15 12:33:14 +05:30
Ankush Menat
edbb44925e refactor: better varname and use get_table_name
Co-Authored-By: gavin <gavin18d@gmail.com>
2022-06-15 12:30:38 +05:30
Ankush Menat
d3bb434e3c fix(ux): make log setting grid editable 2022-06-15 12:30:38 +05:30
Ankush Menat
aeb5034a96 refactor: slightly resilient patch and defaults 2022-06-15 12:30:38 +05:30
Ankush Menat
95eb6cd085 feat: support log clearing for more doctypes
- Route History
- Error Snapshot
- Scheduled Job Log (only completed ones)
2022-06-15 12:30:38 +05:30
Ankush Menat
ea416f9d6b feat: log settings with "interface"
We have hardcoded "Log settings" to only apply on 3 doctypes, there are
few more logging doctypes in core which are not cleared right now, on
top of that it's not easy for user to configure all logging behaviour
from one place.

This change adds a table on log settings where logging doctypes that
support the interface required by log settings can auto-register and
show up in settings.

Currently only supported configuration is "number of days" to keep.
2022-06-15 12:30:38 +05:30
Ankush Menat
ef1200d94b fix!: dont auto set old logs as "seen"
Not sure why this is ever required, also not configurable.
2022-06-15 12:30:38 +05:30
Rushabh Mehta
f626464572
Merge pull request #16983 from alyf-de/select-user
fix: allow All to select a User
2022-06-14 14:21:56 +05:30
Sagar Sharma
d26075cdd2
Merge branch 'develop' into fix/user-type 2022-06-13 21:56:18 -07:00
Deepesh Garg
f88ec4de83
Merge branch 'develop' into system_manager_role_restriction 2022-06-14 08:41:27 +05:30
Ankush Menat
cc0672537e fix: make error/patch log read only 2022-06-13 16:42:37 +05:30
Ankush Menat
9b7b32e604 fix(ux): report and status filter for prepared_report 2022-06-13 16:42:37 +05:30
Ankush Menat
77d03d2393 fix: add list view filters for prepared report 2022-06-13 16:42:37 +05:30
Ankush Menat
ec860cacea fix(ux): list view filters for server script 2022-06-13 16:42:37 +05:30
Ankush Menat
37086c035c fix: show user and docname filter on access log 2022-06-13 16:42:37 +05:30
Ankush Menat
149594448e fix(ux): make deleted doctype read only
- also add filter for doctype in list view
2022-06-13 16:42:37 +05:30
Ankush Menat
3730e20618 fix(ux): better layout on error log
- plus show button to see relevant error logs
2022-06-13 16:42:37 +05:30