Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disable Sharing globally (#20318) [backport] #20500

Merged

Commits on Mar 29, 2023

  1. feat: Disable Sharing globally (frappe#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>
    marination and ankush committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    49b9ea7 View commit details
    Browse the repository at this point in the history
  2. test: fix test case to modified behaviour

    We throw instead of showing warning now
    ankush authored and marination committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    fe76082 View commit details
    Browse the repository at this point in the history
  3. style: format

    [skip ci]
    ankush committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    8b79572 View commit details
    Browse the repository at this point in the history