Commit graph

299 commits

Author SHA1 Message Date
schilgod
bcaabe5163 Enhancement to allow User to login from any IP if two factor auth is enabled (#5209)
* Enhancement to allow login from any IP if two factor auth is enabled

* Resolve Conflicts

* optimize code
2018-05-25 10:50:24 +05:30
Nabin Hait
6737f1912c Fixed merge conflict 2018-05-08 15:27:37 +05:30
Ameya Shenoy
09e71d0d77 added floor and ceil to frappe.utils (#5536)
Added frappe wrappers to math.ceil and math.floor, since they are widely
used functions. Also added their docstrings for documentation and wote
test cases. And some minor typo fixes
2018-05-08 15:13:50 +05:30
Prateeksha Singh
6724cf1776
Merge pull request #5200 from CodedInternet/password-hashing
Migrate password hashing away from mysql password()
2018-05-03 17:42:42 +05:30
Prateeksha Singh
d2dfda2711
Merge pull request #4973 from lasalesi/configurablepdfborder
using regex instead of soup to parse pdf page margins
2018-05-03 17:41:52 +05:30
Ameya Shenoy
2405569b18
Merge branch 'develop' into password-hashing 2018-04-26 20:22:42 +05:30
Suraj Shetty
95c02f94ef Nested permission (#5460)
* nested permission

* test for nested permission

* [minor] Format code

* Fix nested permission test

* Fix codacy
2018-04-20 18:07:55 +05:30
Rushabh Mehta
5ed8eeadb7
Merge branch 'develop' into password-hashing 2018-04-16 01:33:35 -08:00
KanchanChauhan
4232013e65 Check number format only if precision missing (#5357)
* Check number format only if precision missing

* handle string inputs
2018-04-13 11:11:09 +05:30
Rushabh Mehta
c4e1b9e0c1
[enhance] Add condition in transitions and move workflow to server-side (#5399)
* [workflow] move to server side

* [workflow] tests

* [workflow] tests

* [minor] remove print

* [fixes] tests and lint

* [tests] fix typo

* [fix] tests
2018-04-11 00:38:13 -08:00
Tom Price
e641ae70bd Migrate password hashing away from mysql password()
This is deprecated and needs to be replaced. 
Use passlib to hash, store, verify and upgrade as necessary.
Includes patch to migrate existing passwords in a non-breaking way.

Fixes #5195
2018-04-09 12:26:48 +01:00
Suraj Shetty
0be4342649 User permissions redux (#5314)
* [start] removing simpler user permission structure

* permission changes
removed "apply user permission" from has_permission

* test fixes and other supporting fixes

* Removed Apply user permission code

* additional check to see if user has some user permissions related to a doctype

* test fixes

* removed a test

* Permission changes
- Code to restrict access if module is blocked for user.
- [Fix] ignore user perm if applicable

* List view restrictions ui changes

* removed unwanted apply user perm code

* permission (block module fix)

* permission fix

* change user permission
user permission will not be applied if user doesn't have role permission

* removed left "apply_user_permissions" property

* add user permission help template

* perm js refactor

* ui / ux changes
restrict list view before entering view if user is not permitterd
add description for if owner check in role permission manager

* codacy fixes

* permission code fix
add controller permission check
add blocked module check in build_permission

* optimized get blocked module method
2018-04-03 10:42:04 +05:30
Achilles Rasquinha
b083baa443 fix fmt_moeny 2018-04-01 00:04:39 +05:30
Achilles Rasquinha
159a20e5f8 fix fmt_moeny 2018-03-31 23:59:10 +05:30
Revant Nandgaonkar
9e2f161f3e OAuth 2 ROPC Grant test (#5237) 2018-03-24 12:07:48 +05:30
lasalesi
4c6eb9b416 removed trailing whitespaces (codacy) 2018-03-21 13:47:23 +01:00
lasalesi
4b5af95bd9 added test case 2018-03-21 11:39:25 +01:00
Achilles Rasquinha
f0e84c145a fix travis test 2018-03-13 00:42:50 +05:30
Achilles Rasquinha
977491ff75 fix travis test 2018-03-13 00:41:37 +05:30
Achilles Rasquinha
e059b3c3fa fix travis test 2018-03-13 00:40:51 +05:30
Achilles Rasquinha
c26c741fec fix travis test 2018-03-13 00:39:58 +05:30
Revant Nandgaonkar
f98d782055 Oauth2 tests (#5128)
* oauth2 test for openid profile

* OAuth 2 Test : revoke token
2018-03-08 12:02:33 +05:30
Achilles Rasquinha
abb7f14bbd self.assertEqual 2018-02-28 21:19:01 +05:30
Saurabh
676fdc0098 Merge branch 'master' into develop 2018-02-14 11:43:00 +05:30
Saurabh
40d818af90 [hotfix] sanitize fields to avoid mysql injection (#4994)
* [fix] sanitize fields to avoid mysql injection

* sanitize sql statements to avoid subqueries

* Added test cases

* Raise exception if mysql injection found in fields and related test-cases

* [fix] riase exception if blacklistes function or keyworkds found in fields
2018-02-13 14:45:51 +05:30
tundebabzy
08f9cf7f4b Doctypes Using Tree Structure Should Be Supported When Making Fixtures (#4596) (#4597)
* Documents using tree structure now supported

* final cleanup

* remove hard coded primary button code

* fix bug in logic

* refactor to fix breaking build
2018-01-23 14:46:43 +05:30
Nabin Hait
268e9b2a58 Merge branch 'master' into develop 2018-01-17 18:48:53 +05:30
Faris Ansari
aa7d93cfdb Generic Append number in naming (#4845)
* Generic append_number_if_name_exists

* Add test
2018-01-17 18:45:37 +05:30
Achilles Rasquinha
8b7fede7f4
Merge pull request #4798 from achillesrasquinha/fixes-chat
[frappe-chat] Fixes and Features.
2018-01-16 10:20:22 +05:30
Achilles Rasquinha
a5d4d8635e Fixed Test Runner 2018-01-15 23:16:51 +05:30
Achilles Rasquinha
593bb5cb8b Fixed Test Runner 2018-01-15 23:12:17 +05:30
Achilles Rasquinha
e24c8264fa Create Rooms on the fly! 2018-01-15 22:49:25 +05:30
Achilles Rasquinha
aeee6d9da4 Fixed test_runner failure 2018-01-15 12:57:20 +05:30
Achilles Rasquinha
133bf53188 Added Docstrings, fixed test_test_runner error 2018-01-12 17:37:53 +05:30
Faris Ansari
ba508410d1 Fix Report route (#4789)
* Fix Report route

* minor

* fix Report route in modules

* fix module_view test
2018-01-09 11:16:21 +05:30
Revant Nandgaonkar
02aa7b6f41 Social login refactor (#4519)
* Added DocType Social Login Key

WIP for https://github.com/frappe/frappe/issues/4496
added basic fields
after_insert add provider_username and provider_userid fields on User dt
on_trash deletes added fields on User dt

* Added field to store fontawesome icon for provider

* [Patch] Social Login Keys to Social Login Key

* [Patch] Social Login Keys to Social Login Key

* Social Login Key generates boilerplate

* patch fixed for social_login_refactor

* removed patch-not working

* use social login keys to initiate flow

* Login page shows Social Login Key

* show login via if base_url present

* removed boilerplate generator

* Multiple Changes

fix zxcvbn import in password_strength.py
use of child table instead of additional fields on user dt to store username and userid

* Fetched Template on Client JS

* Frappe social login template working

* Added Social Login Key Templates

* Codacy fixes and validate social login key urls

* [Patch] Social Login Keys (untested)

* [Fix] Patch refactor social login keys

* [Fix] Patch refactor_social_login_keys manually tested

* Refactor OAuth 2.0 related changes for Social Login Key

* [Fix] Patch refactor social login keys

* Test - Adding Frappe Social Login Key

* Social Login Key Tests

check added child table entry on user for provider frappe
it also checks if userid is created

* [WIP] Office 365 Social Login Key Template

* [Fix] Social Login - Redirect URL

* [Test] Single sign-on icons for added provider

* [Fix] Codacy Errors

* [Fix] Social Login Key Form JS

* Docs Added for Social Login Key

* [Fix] Patch Refactor Social Login Keys

* Handle different icon types

Handle different icon types (image, icon, emoji) with just icon field

* Move the login methods to a new py file

frappe.integrations.oauth2_logins added
copied whitelisted guest oauth2 redirect endpoints from login.py
removing the functions from login.py will break backward compatibility

* Social Login Key Form Changes

Moved Enable field to top
Fields which are not editable are collapsed

* [Fix] Codacy Errors

* Corrected Docs, sync.py

* [Docs] Adding a social login provider

* [Fix] set frappe userid from User Social Login

* [Fix] frappe userid in oauth.py

* removed icon_type

* Use frappe.utils.is_image
2018-01-03 14:57:16 +05:30
Nabin Hait
87475865ed Merge branch 'master' into develop 2017-12-28 19:41:27 +05:30
Manas Solanki
7c6004e981 minor fix for the data import (#4706) 2017-12-28 19:34:35 +05:30
Faris Ansari
7595fb75ba
New ListView 💥 + DataTable (#4577)
* first cut

* Code refactoring, styling

* Added Sorting

* Revert query_report to use slickgrid

* cleanup

* Edit cell working

* Add regrid, remove datatable

* Add clusterize

* Update lib, fix get_checked_items

* New ReportView

* wip

* Enable editing, fix styles

* update lib

* wip

* fix refresh rows and editable cells

* Refresh list_view every 3s, decouple refreshing logic

* Report editing fixes

* Cleanup loading fields, add column then refresh list

* [wip] New List View

* [working] Render results

* ListView is now BaseList, add new ListView and GanttView

* Create new page for each ListView

* GanttView working

* CalendarView working

* KanbanView working

* Cache list_view based on page_name

* Gantt view buttons on mobile

* Add ReportView

* Refresh datatable on render

* Setup like

* [start][filters] clean up FilterList

* [filters] refactor FilterList

* [filters] minor fix

* [filters] fix remove filter

* filter utils

* more utils, remove apply

* rewrite as class, remove 'me' references

* [filter] implement on_change to decouple parent functions

* Integrate new filters with new BaseList

* Setup freeze area for ListView

* Set breadcrumbs on setup_page

* Trigger list update from events

* Setup footnote area

* Fix Kanban Board filters

* Add filters to standard filters, then filter_list

* Remove old files

* Fix ImageView

* Some more fixes for BaseList.init

* Fix order_by on load

* Report View: remember columns

* Fix for hidden filters

* Fix for delete items

* InboxView

* Shift select checkboxes

* Fix ESLint errors

* More refactoring

- Move ListMenu to Listview
- New FileView
- Ability to add custom breadcrumbs

* FileManager working

* Tags, set filters from route options

* Custom Reports Working

* List Sidebar reports

* Report Name as title

* Fix ESLint errors

* Fix UI tests

* Fix Kanban test

* Format ID column

* [fix] Kanban cards title

* Checkbox fix

* Fix Activity Page

* Update rows in Report in place

* Child Table columns in Report View
2017-12-27 11:24:25 +05:30
Manas Solanki
520bfc2ae4 New data import (#4601)
* created/moved the files

* added the model for the downloading the data

* add the file with the error data

* changes added other changes and fix codacy

* changes in the config and utils files

* fixed the test cases

* minor changes in the data keys dict

* changed the test file location

* fixed the tests

* set the route in the list view and show only erors

* minor fixes in the childtable import and log tables rendering

* Refactor Download dialog to use MultiCheck
2017-12-15 12:17:24 +05:30
Ameya Shenoy
d746d1e8af Added test-list option to run-ui-tests (#4540)
* Added test-list option to run-ui-tests

will help bifurcating the ui tests into stages

* modified to add new parameters at the end
2017-11-30 16:26:43 +05:30
Shreya Shah
acdbb97ba5 Moved feed from Communication to Activity Log (#4435)
* Removed comment_type 'updated'

* New doctype activity log

* Moved feed.py to activity_log

* Updated feed gets stored in activity_log

* Activity page fetches feed from activity_log

* feed match condition change

* modified

* modified hooks.py

* modified sessions.py

* patch added

* naming in patch

* moved login, logout feed to activity_log

* changes in auth.py, hooks.py

* deleted doctype authentication_log and added test cases

* added utils.py in core

* moved some methods from communication.py to utils.py
2017-11-21 15:46:51 +05:30
Manas Solanki
7031473915 fixed between filters (#4497) 2017-11-15 13:57:53 +05:30
Rushabh Mehta
c02a7469aa
[refactor] a better set-only-once implementation with child tables (#4475)
* [refactor] a better set-only-once implementation with child tables

* [refactor] document.is_child_table_same(fieldname)

* [refactor] tests

* [refactor] tests

* [test] catch timeout reason

* [minor] edit in full page more prominent

* [minor] tests
2017-11-13 17:17:20 +05:30
Achilles Rasquinha
b8825ca116 Pure Python MySQL instead mysqlclient (with Python C API) (#4280)
* added PyMYSQL instead mysqlclient-python

* added pymysql import

* fixed db module import

* foxed self._conn wrapper

* updated cursor migration

* removed existent converters

* some more fixes towards API port

* modified travis

* updated doctype and revereted yml

* modified travis

* refreshed logging

* raw fix

* moved from hard coded constants to declarable instances

* moved from hard coded constants to declarable instances

* refactoring and logging

* moved to global import declaration

* fixed codacy

* unfixed codacy

* minor fix

* binary_type has a single

* deprecated alternative

* merged with latest

* fixed merge conflicts

* using deprecated alternative

* raw fix

* stupid fix

* using StringTypes instead

* brutal hack

* log

* tundebazy to the rescue

* fixed content_hash error

* frappe/database.py

* frappe/database.py

* updated database.py

* updated requirements

* updated requirements

* fixed codacy

* fixed codacy

* moved from DatabaseOperationalError to pymysql.InternalError

* moved from DatabaseOperationalError to pymysql.InternalError

* fixed codacy

* empty commit

* fixed codacy

* fixed codacy
2017-11-06 16:42:01 +05:30
Zarrar
d29e280d14 [Fix] Workflow ui test dependency (#4421)
* timer increased, role selection removed

* used return promise instead of timeout
2017-11-03 13:37:48 +05:30
Zlash65
fec63a32f1 test case added for count 2017-10-31 16:14:36 +05:30
Saurabh
33644ebfb2 [fix] merge conflicts 2017-10-27 16:05:45 +05:30
Rushabh Mehta
8c246365aa Role Profile (#4395)
* Added doctype Role Profile

* Set role profile for user

* Fetch roles from role profile

* Added tests, updated user.js and role_profile.py

* update_roles on add/delete moved to user controller

* added py test

* improved naming

* validate_roles method added

* [minor] style
2017-10-27 15:34:04 +05:30
Nabin Hait
80c63bb226 Save domain settings to create related custom fields for already enabled domain (#4378)
* Save domain settings to create related custom fields for already enabled domain

* Remove all domains from active domains after running test cases
2017-10-27 15:26:02 +05:30