Commit graph

510 commits

Author SHA1 Message Date
Faris Ansari
1f1c7b1390 fix: Init site before calling migrate_to
Locals are not initialized otherwise which is required to access site_config
2020-06-02 12:58:50 +05:30
mergify[bot]
eabdb84947
Merge pull request #10528 from gavindsouza/migrate-to-new-feat
feat(migrate-to): switch Teams and restore existing Sites
2020-06-02 06:57:42 +00:00
Suraj Shetty
4e1ad550ec
Merge branch 'develop' into rpay-webhook-verification 2020-06-01 07:58:04 +05:30
Shivam Mishra
55aca943c3 feat: make verification function python 3 only 2020-05-29 14:09:19 +05:30
Shivam Mishra
2ef76f2572 style: linting fixes 2020-05-29 13:24:04 +05:30
Shivam Mishra
5e7fcb46f2 refactor: use six instead of sys.version_info 2020-05-29 13:22:52 +05:30
Mangesh-Khairnar
7a6746bf32
fix(google-contacts): add additional params to prevent rate limiting (#10491) 2020-05-29 11:42:34 +05:30
Gavin D'souza
4f99b5879e fix: set frappecloud_url in conf to override specified url 2020-05-28 20:28:55 +05:30
Gavin D'souza
a65be3e22a fix: undefined variables 2020-05-28 18:51:17 +05:30
Gavin D'souza
a1ee529cb7 fix: show only Active and Broken sites in Sites List 2020-05-28 18:42:06 +05:30
Gavin D'souza
b8138004d9 feat: allow restoring to existing FC sites 2020-05-28 18:20:02 +05:30
Gavin D'souza
aabbfb8df8 feat: switch teams if you are a part of multiple 2020-05-28 18:17:41 +05:30
karthikeyan5
bba7336b6c fix(dropbox): dropbox timeout for large files 2020-05-27 08:39:50 +05:30
Shivam Mishra
2813a0edc1 feat: added webhook hmac verification 2020-05-22 13:31:49 +05:30
Gavin D'souza
f7f81a0843 chore: add missed import 2020-05-15 17:52:40 +05:30
Gavin D'souza
7a58cbeff2 fix: hardcode url frappe.cloud => frappecloud.com 2020-05-15 16:30:17 +05:30
Faris Ansari
4af13edc87 fix: Remove hardcoded url 2020-05-15 16:13:16 +05:30
Faris Ansari
ce734e88e5
Merge branch 'develop' into migrate-to 2020-05-15 15:34:03 +05:30
Faris Ansari
a8c01a0915 fix: Success message 2020-05-15 15:32:13 +05:30
Gavin D'souza
db3b57116d fix: consistent UI and minor fixes 2020-05-15 15:16:56 +05:30
Gavin D'souza
85d86fbedf refactor: moved remote_migrations to
frappe.integrations.frappe_providers

fix: exit code fixes and minor bug fix
2020-05-15 11:21:24 +05:30
mergify[bot]
41d0d22edc
Merge pull request #10298 from Mangesh-Khairnar/fix-google-contacts-isse
fix(google-contact): remove parent kwarg from create contact
2020-05-13 17:33:13 +00:00
Mangesh-Khairnar
4f3c40ae3d fix(google-contact): remove parent kwarg from create contact 2020-05-12 15:52:03 +05:30
Chinmay D. Pai
9b6f0a2e4c
fix: use doctype instead of service name to send email
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-08 20:18:08 +05:30
Suraj Shetty
97f6d8f209
Merge branch 'develop' into s3-backup-update 2020-05-03 12:54:38 +05:30
mergify[bot]
4d937584f9
Merge pull request #10209 from gavindsouza/webhooks-validate
fix(webhooks): error message on invalid json
2020-05-02 15:30:17 +00:00
Gavin D'souza
5a3f2380d1 fix: handle specific exceptions and add exc title 2020-05-02 19:05:44 +05:30
Gavin D'souza
a09e0f339b fix(webhooks): error message on invalid json 2020-05-01 14:19:59 +05:30
RJPvT
2fd1996506
fix: check if ldap user requires 2fa on login 2020-04-19 16:02:19 +02:00
Chinmay D. Pai
f19d70b2e0
chore: set backup_files by default and use cint
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-13 20:58:55 +05:30
Chinmay D. Pai
ea798af266
fix: make backup files optional and ux fixes
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-13 20:55:19 +05:30
Shivam Mishra
d4e6b89863 Merge branch 'develop' of github.com:frappe/frappe into desk-user-custom 2020-04-10 15:48:53 +05:30
Shivam Mishra
4764f65c13 Merge branch 'develop' of github.com:frappe/frappe into desk-user-custom 2020-04-08 18:12:43 +05:30
Suraj Shetty
284c70809b fix: Translatable strings with trailing spaces 2020-04-08 14:20:52 +05:30
Saurabh
1bc97e8f8a
feat: Offsite backup (#8241)
* feat: utility to get file size

* feat: if backup file is greater than 1gb then consider latest backup site instead of taking new

* fix: remove unwanted import

* chore: fix condition inside offsite backup utils

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: change email field to notify_email

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* feat: add offsite_backup support for google drive

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: get recipients from within send_email

pass email_field to send_email instead of calling two functions

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: set flag within validate_file_size

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* feat: get latest file backup when specified

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix incorrectly spelled dropbox settings

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: implement file backup logic for aws s3

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: fix deepsource issues

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: Chinmay D. Pai <chinmaydpai@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-04-07 00:06:27 +05:30
Shivam Mishra
c67ecbc6ba feat: update desk pages 2020-04-01 11:25:15 +05:30
Chinmay D. Pai
5fbf1f8c08
chore: make the exception read slightly better
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-19 21:53:39 +05:30
Chinmay D. Pai
bc77455d13
chore: correct indentation for ldap exceptions
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-19 21:49:58 +05:30
Chinmay D. Pai
94b2d856fc
feat(ldap): allow resetting ldap password from user settings
currently, there is no way to reset password for those logging in
through ldap. i understand that this shouldn't really be handled by
erpnext, but there are people that have requested resetting the ldap
password from with the instance itself, and hence, we'll let that happen
now.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-19 21:44:45 +05:30
Andy Zhu
fcdb923d2e
fix: Missing bucket name check (#9546)
* fix: missing bucket name check when user make changes on s3 backup setting

Problem: If the user changed the backup limit, then press save. The validate function will give an error message that the bucket name already exists. It would be inconvenient for the user to use a different bucket name to save any changes.

So I implemented a flag ''bucket_name_exist'' to indicate if the bucket name exists, if not, then go to the flow of trying to create a bucket.

* fix: extra line removed

* fix: Use head_bucket Boto3 API 

1. Head_bucket will return 200 Ok if the bucket exists and you have permission to access it.
2. Error code 403 Forbidden, Error code 404 Not Found.
3. Use bucket_name_exist to check if need to create bucket.

Thanks @Mangesh-Khairnar suggestions.
Reference: 
1. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.head_bucket
2. https://boto3.amazonaws.com/v1/documentation/api/latest/guide/migrations3.html#accessing-a-bucket

Further improvements:
1. Use 'GET' Requestion to check if the Access Key ID and Secret Access Key is valid (Because AWS tier has 20,000 GET requests while only 2,000 LIST requests)
2. Edge case on Error prompts when head_bucket returns an error code other than '403' or '404'.

* fix: add an extra line to align with original code style

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Chinmay Pai <chinmaydpai@gmail.com>

* fix: remove the flag and redundant exception

When we got a 404 error, we can just create the bucket as 1. The bucket name does not exist in the current bucket. 2. we have permission to access the bucket.

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>

* Update frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py

Co-Authored-By: Chinmay Pai <chinmaydpai@gmail.com>

* fix: missing handling the error code '400' - 'Bad Request'

* fix: applied with DeepSource analysis

1. Lines too long
2. Doc Lines too long
3. Expected 2 blank lines between class and method
4. Unused variable removed

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
2020-03-13 13:06:36 +05:30
Shivam Mishra
6461a01fc5 feat: update doctype 2020-03-12 16:33:37 +05:30
Shivam Mishra
bdb34ea006 feat: update is_standard for integrations page 2020-03-12 11:32:00 +05:30
Shivam Mishra
af475a7d5d fix (cleanup): remove incomplete dependencies data 2020-03-05 11:31:19 +05:30
Shivam Mishra
6067d51c64 feat: added integrations page 2020-03-02 18:49:57 +05:30
Shivam Mishra
724564103c
fix: better logging for slack (#9474)
* fix: better logging for slack

* chore: cleanup code and get from dict

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
2020-02-17 14:49:45 +05:30
Andy Zhu
209393ecbd
Fix (S3-Backup-Setting): ensure recipients and sender are corre… (#9417)
* fix: sender is not set to current user

I am not sure if I did it right:
1. import frappe
2. check if the sender is None: using frappe.session.user to fetch email address for current user

* fix: update the correct field name for S3-backup-setting

The field variable name should be updated to 'notify_email' instead of 'notification_email'.

* style: remove a trailing whitespace

* fix: Assign notify_email instead of calling frappe.db.get_value twice

* chore: remove default sender and notify_email check

* default sender already gets set in queue.py, so there's no need for a
  check inside __init__.py

* notify_email seems to be a mandatory field, so there's no need to
  check if the field has a value (assuming that it always will).

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
2020-02-08 14:36:05 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
mergify[bot]
f2c4b471fd
Merge pull request #9247 from Mangesh-Khairnar/fix-stripe-receipt-email
fix(stripe): sent email receipts for one time charge
2020-01-16 05:52:25 +00:00
mergify[bot]
9cba2e31d9
Merge pull request #9244 from Alchez/dev-webhook-security
feat: add security headers to webhook
2020-01-14 11:59:26 +00:00
Mangesh-Khairnar
dfa9bf463d fix: stripe api payment receipt email 2020-01-13 17:22:44 +05:30