Commit graph

20 commits

Author SHA1 Message Date
Faris Ansari
3b86f16b73 New Control: Table MultiSelect (#6675)
* feat(control): Add Table MultiSelect control

* fix: Use btn-group instead of span

* fix: Remove functionality

* fix: Add 'Table MultiSelect' to Field doctypes

* fix: Replace usage of string 'Table' with array `table_fields`

* fix: Use internal array to store values instead of building from HTML elements

* fix(style): Add semicolon

* fix: Read only mode and click to navigate to form

* style: indent

* fix: fallback to empty array

* fix: Add formatters in js and py

* style: missing semicolon

* fix: Add docfield validation
2018-12-28 15:36:59 +05:30
Suraj Shetty
1e23e98a54 Catch KeyError in liked_with to fix failing patch
https://travis-ci.com/frappe/erpnext/jobs/167043420
2018-12-26 11:06:23 +05:30
Manas Solanki
01b6b74b6d [fix] linked with if there are multiple link field in the same doctype (#5587)
* [fix] linked with if there are multiple link field in the same doctype

* handle python 3 and fixed as per reviews
2018-05-30 11:43:39 +05:30
Suraj Shetty
3109123249 Permission improvements (#5494)
* Overwrite "if owner" restriction*
- Overwrite "if owner" restriction if user has other valid roles
(with access rights) without if_owner enabled for it in doc perm
eg:
If a doctype has 2 docperm for Role A and Role B and the docperm with
Role A has  if owner enabled.

Suppose User 1 has Role A, then User 1 should see only docs
which was created by him.

Now if User 2 has Role A and Role B, User 2 should be able to see all the
records because Role B has unrestricted access on doctype.
------------------------------------------------------

Previously in case of User 2, the restriction(of if owner) from Role A
used to reflect and User 2 was only able to view only records made by
him.

This commit will overwrite the if_owner restriction in such case.
- Refactor get_role_permission method

* Add advanced control for user permission
- Add ability to skip user permission check for specific doctype

* Refactor "linked with" method
- Add option to skip linked with doctype which has
ignore_user_permission enabled against them.

* Clear "linked with doctype" cache on doctype changes

* [Minor] Fix formatting

* Fix error and bugs in linked_with method

* Format code

* Add fix to get allowed docs from user_permission

* Fix has_user_permission bug

* Add before migrate patch for user permission

* Fix typo
2018-05-04 13:13:29 +05:30
Achilles Rasquinha
0fc518ace4 python 3 fixes 2018-03-31 18:15:43 +05:30
Aditya Hase
f7da376279 Convert dict.keys() to list explicitly for deleting elems while iterating 2017-09-27 01:08:07 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
rohitwaghchaure
73af73c2e7 [fix] When user clicks on link in invoice there are duplicate DNs are showing against it (#3204) 2017-05-01 14:14:32 +05:30
Rushabh Mehta
225e4a172a [minor] removed linked_with caching - what a terrible idea!, fixes #4936 2016-12-16 14:51:40 +05:30
Saurabh
c740c96931 [fixes] get previous doc links from respective doctype 2016-06-27 12:29:22 +05:30
Saurabh
37d36d029c [fixes] fixed previous links with doc 2016-06-27 12:29:22 +05:30
Anand Doshi
c8e0384ce1 [cleanup] document flow 2016-06-07 18:55:15 +05:30
Saurabh
4e55c1770c [fixes] get only selected doctype linkings 2016-06-07 16:30:55 +05:30
Saurabh
aaa64ab347 [fixes] added css for module flow 2016-06-07 16:30:55 +05:30
Saurabh
5736a9819f [enhance] show module flow on top of doctype 2016-06-07 16:30:55 +05:30
Anand Doshi
a64a707a1f [fix] linked_with caching 2016-02-19 19:45:22 +05:30
Anand Doshi
d780c8ae22 [fix] the case when linked with custom doctype 2015-11-09 14:30:32 +05:30
Anand Doshi
f178ef0911 [fix] test_form 2015-10-15 14:08:29 +05:30
Anand Doshi
999cea874c [fix] Implemented caching in linked with 2015-10-15 12:51:04 +05:30
Anand Doshi
0ece804cca [fix] Linked With should also search in Dynamic Links. Fixes #1192 2015-10-15 12:51:04 +05:30