Commit graph

36 commits

Author SHA1 Message Date
Rohit Waghchaure
0fa1b9cab4 fix: user ignore permissions not working at server side 2019-04-02 18:57:13 +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
Nabin Hait
ff1d430af6 fix: Set field default based on user permissions 2019-02-04 13:51:38 +05:30
Suraj Shetty
132a92e6cc fix: "list object has no get attribute" error while saving new doc (#6799)
* Fix .get() function not found error while saving new doc

* Remove print statement
2019-01-22 11:26:10 +05:30
Suraj Shetty
83a17a8242 Fix user permission on link fields 2018-11-01 21:18:15 +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
Rushabh Mehta
f609a478ae [refactor] user permissions (#3713)
* [refactor] user permissions

* [fix] tests

* [ux] user-permissions

* [minor] cleanup system settings

* [minor] end progress
2017-07-28 14:33:31 +05:30
Nabin Hait
d429af9a7e [fix] No need of sanitization while creating new_doc 2016-01-19 16:51:20 +05:30
Nabin Hait
5439a392f0 [fix] user defaults based on user permissions 2015-12-28 18:34:00 +05:30
Anand Doshi
6388842866 [hotfix] defaults in create_new 2015-12-25 12:38:16 +05:30
Nabin Hait
49b7457167 [fix] Get user defaults based on fieldname in special cases 2015-12-24 12:59:29 +05:30
Nabin Hait
930cd7d78e [fix] Get defaults based on doctype or fieldname 2015-12-23 16:34:43 +05:30
Anand Doshi
ffb8ef29ca [fix] Use User Permission value as default only if the document type is Setup 2015-09-14 13:00:24 +05:30
Rushabh Mehta
33c097b97c [enhancement] editable title field 2015-08-26 20:56:28 +05:30
Anand Doshi
c0653c31fc [fix] timedelta to mysql time converter 2015-04-08 21:20:13 +05:30
Anand Doshi
76d485319c refactored create_new and disabled create_new caching 2015-04-06 21:05:08 +05:30
Rushabh Mehta
c153b810e0 [fix] high level perms serverside checking 2015-03-26 19:33:10 +05:30
Rushabh Mehta
99ca7d5f8a [email] fixed test cases for bulk emails 2015-03-19 17:15:44 +05:30
Anand Doshi
5214bb286a Fixes in test cases and recents 2015-03-05 16:29:26 +05:30
Anand Doshi
2995f02f3b Web Notes to Frappe, better alerts, css fixes, fixed splash 2015-03-03 15:09:34 +05:30
Anand Doshi
daaf55f047 [fix] create new 2014-09-12 15:31:51 +05:30
Anand Doshi
f8d9271094 [fix] setting a default value using create_new 2014-09-09 12:49:16 +05:30
Anand Doshi
ea8b7c9934 [fixes] Permission 2014-09-05 15:14:07 +05:30
Anand Doshi
4cb56389c3 Changed how defaults are set when creating new documents 2014-07-16 15:51:02 +05:30
Rushabh Mehta
a905ce48eb create_new.py: fix for ignore_permissions 2014-06-06 09:53:41 +05:30
Anand Doshi
fec15666f4 Started permission relogication 2014-06-04 17:52:17 +05:30
Anand Doshi
3c160b6554 Deprecate Select fields with options as link: 2014-05-09 13:35:09 +05:30
Anand Doshi
445ba943c7 Fixes in create new, base document, run method and letter head 2014-04-23 19:16:10 +05:30
Anand Doshi
c709b48a03 Auto set Select values for new documents, other minor fixes 2014-04-15 16:19:20 +05:30
Rushabh Mehta
7bef30b270 frappe/frappe#478 2014-03-28 16:52:23 +05:30
Anand Doshi
2680459e2f frappe/frappe#478 2014-03-28 15:23:25 +05:30
Anand Doshi
f1eb0dd005 Replaced doc, doc.fields frappe/frappe#478 2014-03-28 13:54:53 +05:30
Rushabh Mehta
1e364ba1c7 #478 2014-03-28 11:34:59 +05:30
Rushabh Mehta
335c333bcc #478 2014-03-24 18:47:20 +05:30
Anand Doshi
edbadc18b2 Changed frappe.conn to frappe.db 2014-02-26 12:35:02 +05:30
Rushabh Mehta
024ddfcc5b -webnotes +frappe 💥 2014-02-14 14:55:11 +05:30
Renamed from webnotes/model/create_new.py (Browse further)