seitime-frappe/frappe/desk/form
Marica 90f8f945b4
feat: Disable Sharing globally (#20318)
* feat: Disable Sharing globally

- Checkbox in System Settings
- If disabled, avoid share UI render
- Share APIs return None (non-obstructing) if share APIs are invoked

* feat: Settings checkbox must toggle share permission globally

- Treat feature like a perm toggler. Essentially noone is allowed to explicity share anything
- Implicit sharing via `ignore_share_permissions` is allowed. Devs can decide where sharing should happen under the hood
- UI is made read only and not hidden. Users must see who doc is already shared with
- Make sure perm APIs used by share feature return false if sharing is disabled
- Rename checkbox to `Disable Document Sharing`

* test: (server side) Impact of disabling sharing on APIs

- Also, fix missed system setting rename in `assign_to`

* fix: Inform assigner if assignee lacks perms and sharing is disabled

- misc: readable conditions

* fix: throw instead of msgprint

* fix: Typo and appropriate message for `throw`

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-28 18:13:37 +05:30
..
__init__.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
assign_to.py feat: Disable Sharing globally (#20318) 2023-03-28 18:13:37 +05:30
document_follow.py perf: specify reference doctype in filters 2022-08-02 06:15:00 +05:30
linked_with.py revert: checking if user has permission to meta (#19485) 2023-01-05 13:47:14 +05:30
load.py fix: support for different delimiter for timeline email linking (#19751) 2023-02-03 11:47:38 +05:30
meta.py fix: String formatting index in error message (#19977) 2023-02-10 22:26:44 +05:30
save.py refactor(minor): use DocStatus (#19545) 2023-01-10 17:38:11 +05:30
test_form.py test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
utils.py fix: handle image extraction while editing comment 2023-03-16 16:00:06 +05:30