Commit graph

358 commits

Author SHA1 Message Date
Aditya Hase
11fca9fb5c feat: Maintain list of tables touched during migrate
This can be used to selectively restore changed tables from backup
after migrate failure
2019-04-23 10:32:34 +05:30
Suraj Shetty
73c1f531e8 fix: Set default only if the dependent field is set (#7130)
Client side fix
https://github.com/frappe/frappe/pull/7004
2019-03-28 11:46:51 +05:30
Suraj Shetty
bce52fdd31
Merge pull request #6979 from rohitwaghchaure/removed_duplicate_page
fix: Removed duplicate page user permissions for page and report
2019-02-26 16:18:39 +05:30
Rohan
302f781fd8 fix(report): Fix file exports for reports that show totals (#6902)
* fix(report): Fix file exports for reports that show totals

* fix(report): Add tests for Query Report export
2019-02-26 16:11:55 +05:30
Rohit Waghchaure
288dae9adc fix: test cases 2019-02-25 12:30:37 +05:30
Suraj Shetty
73c67481de
test: Change total post length 2019-02-06 16:27:46 +05:30
Nabin Hait
a7a4679a09 fix: tests for user permissions 2019-02-05 18:41:19 +05:30
Nabin Hait
ff1d430af6 fix: Set field default based on user permissions 2019-02-04 13:51:38 +05:30
Rushabh Mehta
d09792c606 fix: refactor global search to not insert after every commit (#6845)
* fix: refactor global search to not insert after every commit

* feat: configuration to disable_global_search
2019-01-30 11:13:51 +05:30
Suraj Shetty
5af8d4d1bb
Merge pull request #6824 from netchampfaris/feat-is-set-is-not-set
feat: New filter type "Is Set", "Is Not Set"
2019-01-29 07:27:57 +05:30
Aditya Hase
928ec12d35 fix(import): Import print_function once 2019-01-28 14:54:55 +05:30
Aditya Hase
837bfc0995 fix(unicode): Import unicode_literals in every file (#6805)
* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
2019-01-25 11:56:27 +05:30
Faris Ansari
2b336c235c tests: Add tests for "Is Set" and "Is Not Set" filter 2019-01-24 14:43:44 +05:30
Aditya Hase
6b72faf44f style: Linting fixes (#6809)
* style: Remove unused imports

* style: Remove unused local variables
2019-01-23 16:39:55 +05:30
Suraj Shetty
95e9afa1f3 feat: Clear user permissions button (#6767)
* Add button to delete user permissions in bulk

* Show no records deleted the delete count is 0

* Return this from show of dialog to make it chainable

* Add test for clear user permissions function

* Fix test

* Format code

* Reset the user

* Remove rollback from test

* Move clear user permission button to menu

* fix: Translations
2019-01-21 16:52:12 +05:30
Suraj Shetty
9adbbd44c8 fix(permission): Role permission check with if_owner enabled (#6726)
* Allow user to access list even if there is only a docperm with if owner enabled

* Add test to check if user gets access to the list

- User should be able to access list even if the user has only
 role for which docperm is created with if_owner check

* Remove commented code
2019-01-05 14:31:40 +05:30
Suraj Shetty
d3722cdaee test: Add code to test build_match_conditions (#6704)
* Add code to test build match condition

* Fix typo

* Make quotes consistent

* Reorganize

* Fix test
- Add user permission for record created during test

* Reset session user as admin

* Fix a year dependent test
- Remove hardcoded year from test
2019-01-01 15:04:30 +05:30
Chinmay Pai
825b0120fa fix(login): redirect user from login page if already logged in (#6689)
* fix(login): redirect user from login page if already logged in

the user should not be able to access the login page if a user session already exists. closes #6500.

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

* fix(test-website): fix website test

what is the point in writing tests if they don't really work/function as intended?

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

* fix(regex): do not replace '\' in rules

that defeats the entire purpose of creating rules, wtf?

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

* fix(test_website): change user using set_user()

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

* redirect: prefix string with r to escape string literals

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-12-31 13:46:55 +05:30
Suraj Shetty
45911faa23
Merge branch 'staging-fixes' into staging-fixes 2018-12-18 15:26:11 +05:30
Rushabh Mehta
0f5f04b409
fix(tests): one more attempt to fix the erratic test_scheduler.py (#6612)
* debug(test_scheduler): please fail

* fix(tests): use flags instead of globals since cache is not trhead-safe
2018-12-12 14:09:50 +05:30
Rushabh Mehta
dad0b84847
fix(patch): check if table exists for old prepared reports (#6605)
* debug(test): test_scheduler_events

* fix(patch): check if table exists for old prepared reports

* debug(tests): add comments for debug
2018-12-11 11:08:50 +05:30
Suraj Shetty
390254b65d
Merge branch 'staging-fixes' into staging-fixes 2018-11-29 09:18:43 +05:30
Ameya Shenoy
f513739d1a
Merge branch 'master' into staging-fixes 2018-11-28 07:53:35 +00:00
Saurabh
4738a9711a fix: tighten protection against sql injection (#6546) 2018-11-28 10:22:30 +05:30
Suraj Shetty
82c4180635 Add test to check if owner permission if applied properly 2018-11-05 08:36:08 +05:30
Suraj Shetty
3a40880bfd Pass reference doctype to search link to get contextual results 2018-11-02 12:56:10 +05:30
Suraj Shetty
4b0f78a6d5 Add test to check contextual user permission 2018-11-01 21:18:15 +05:30
Ameya Shenoy
55fbf7ad99
Merge branch 'master' into staging-fixes 2018-10-31 10:40:55 +00:00
Saurabh
a1e68b6fd5 [fix] potential sql injection by sanitizing fields parameter 2018-10-31 14:26:22 +05:30
Shreya
aca6dd0686 test: Add test case 2018-10-30 12:13:28 +05:30
Rushabh Mehta
eba27d1a5c fix(test): test_scheduler fails randomly 2018-10-22 10:23:03 +05:30
Rushabh Mehta
5aaee31c49 fix(test): test_scheduler.py 2018-10-02 10:51:52 +05:30
Charles-Henri Decultot
98abda32b4 [Enhancement] Event timeline (#6133)
* Events in timeline wip

* Events in timeline

* Permission issue + split buttons between Frappe and ERPNext

* Add string type check

* Codacy corrections

* Permission issue

* Test and feedback corrections

* Codacy corrections

* Tests and codacy corrections

* Codacy correction

* Py3 correction

* Travis correction

* Py3 corrections"

* Travis and codacy corrections

* Removed space

* Add check for the removal of new lines

* Codacy rollup watch missing semicolon
2018-10-02 10:12:55 +05:30
Prateeksha Singh
eb5b7a77c9 [Feature] Format Autoname (#6017)
* [Feature] Format Autoname

- Generate autoname by replacing all instances of braced params
- Independent of remaining string or separators.
- Remove autoname Concatenate option

* [autoname] add test for format autoname
2018-09-03 10:58:56 +05:30
Rushabh Mehta
ad9ce8a3a3 fix(test): test_scheduler.py 2018-08-27 11:20:25 +05:30
Charles-Henri Decultot
dab491e55f Doctype links in foreign language (#5745)
* Doctype search in foreign language

* List comprehension slightly faster

* Remove obsolete comment

* Remove trailing whitespace

* Test case for address and contact query

* Refactor search and add tests

* Travis test debug

* Remove debug print

* Search limit removal for untranslated docs and tests refactor

* Remove old comments

* Test modification for Travis

* remove unused import

* Correct Role doctype
2018-08-24 15:23:20 +05:30
Neil Trini Lasrado
6177c1f4ad Changed email domain to example.com (#5985) 2018-08-20 10:36:58 +05:30
sivankar
a48b76b940 refactored code to add support in filters to get descendant or ancest… (#5847)
* refactored code to add support in filters to get descendant or ancestor for tree type documents

* added semicolon and comments to imporve code quality

* refactored code to add not ancestor and not descendants of filters

* added test cases for ancestors of and descendants of

* Translate labels
2018-08-14 12:19:18 +05:30
Prateeksha Singh
213279ec87
Merge pull request #5783 from szuyxy/global_search_support_and
[Enhance] Global search multi key words to pin point search result
2018-08-14 12:09:29 +05:30
Rushabh Mehta
aef1046b1f
[email] remove style from email so it does not mess up desk (#5860)
* [email] remove style from email so it does not mess up desk

* [fix] tests

* [fix] image parsing, #savedbyatestcase

* [fix] timeout issues in test

* [fix] timeout issues in test
2018-07-24 17:00:14 +05:30
Fisher Yu
e0cfa416cb
Update test_global_search.py 2018-07-24 00:19:40 +08:00
Fisher Yu
3ca6a19f33
Update test_global_search.py 2018-07-24 00:13:31 +08:00
Fisher Yu
c2a536938c
Update test_global_search.py 2018-07-24 00:06:57 +08:00
Shridhar Patil
abd3333bae Token based authentication (#5752)
* token based authentication

* authentication

Basic base64encode(api_key:api_secret)
token api_key:api_secret

* test added

Validation: only user with system manager can generate the keys

* codacy issues fixed

* token based authentication

* authentication

Basic base64encode(api_key:api_secret)
token api_key:api_secret

* test added

Validation: only user with system manager can generate the keys

* codacy issues fixed

* use frappe.safe_encode

* base64 encode use frappe.safe_encode

* set frappe.local.form_dict after setting user

* removed test

* removed unused imports

* test for python 3

* Update user.js

* [user.py] throw correct error

* Update user.py
2018-07-23 11:06:29 +05:30
Fisher Yu
0cbe649762
Update test_global_search.py
added 2 test cases
2018-07-19 22:01:31 +08:00
Saurabh
176f3b6a15 Resolved merge conflicts 2018-07-18 16:20:06 +05:30
Saurabh
5a7ee536d3
Merge pull request #5810 from saurabh6790/test_case_fixes
test case fixes for db query engin
2018-07-11 14:43:49 +05:30
Saurabh
b40d6f9a71 test case fixes for db query engin 2018-07-11 13:45:36 +05:30
Saurabh
081b17fbe8 [security][fix] tighten criteria to prevent sql injection in search-f… (#5800)
* [security][fix] tighten criteria to prevent sql injection in search-fields

* test cases
2018-07-11 11:04:51 +05:30
Saurabh
93165d4a5c test case fixes (#5807) 2018-07-11 11:02:27 +05:30