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 (backport #20318) #20492

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 28, 2023

This is an automatic backport of pull request #20318 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* 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>
(cherry picked from commit 90f8f94)
@mergify mergify bot requested review from a team and phot0n and removed request for a team March 28, 2023 12:44
We throw instead of showing warning now
@ankush ankush merged commit 67a537c into version-14-hotfix Mar 29, 2023
@ankush ankush deleted the mergify/bp/version-14-hotfix/pr-20318 branch March 29, 2023 03:57
@ankush ankush added the Skip CI Doesn't run Ci for this PR. label Mar 29, 2023
frappe-pr-bot pushed a commit that referenced this pull request Apr 4, 2023
# [14.31.0](v14.30.0...v14.31.0) (2023-04-04)

### Bug Fixes

* allow `reset_otp_secret` only if Two Factor Auth is enabled ([#20506](#20506)) ([#20561](#20561)) ([ca486c4](ca486c4))
* allowed only POST and PUT methods in `rename_doc` ([#20504](#20504)) ([#20565](#20565)) ([fd1f6fe](fd1f6fe))
* bulk update using doc method, check perms ([#20522](#20522)) ([2237968](2237968))
* cannot restore cancelled document if workflow is active ([547efe3](547efe3))
* Check if reference_name is set ([2e9068b](2e9068b))
* content_type can be `None` during file upload ([#20572](#20572)) ([#20574](#20574)) ([ebc6059](ebc6059))
* date field shouldn't be formatted for TZ ([#20486](#20486)) ([#20490](#20490)) ([07b7b46](07b7b46))
* don't hide tab with dashboard if there is a visible section/control ([084e8af](084e8af))
* Drop message_id index before migrating email queue ([#20376](#20376)) ([#20578](#20578)) ([394c232](394c232))
* email linking and message_id indexing ([#20356](#20356)) ([#20579](#20579)) ([5ae94ef](5ae94ef))
* escape HTML instead of sanitizing ([2269d6e](2269d6e))
* fix address query for postgres ([f01566a](f01566a)), closes [/github.com//pull/20537#ref-pullrequest-1645575433](https://github.com//github.com/frappe/frappe/pull/20537/issues/ref-pullrequest-1645575433)
* get workflow_state_fieldname instead of setting workflow_state to none ([bac4e9b](bac4e9b))
* Handle JsBarcode exceptions ([#20532](#20532)) ([b1c3d8b](b1c3d8b))
* heatmap not reset on dashboard refresh ([3c0659b](3c0659b))
* hide chart and heatmap on dashboard reset ([cec7a73](cec7a73))
* Incorrect use of the Walrus operator ([a70a5ca](a70a5ca))
* nestedset rename ([#20498](#20498)) ([#20499](#20499)) ([b831392](b831392))
* removed unnecessary usage of `[@frappe](https://github.com/frappe).whitelist` ([#20503](#20503)) ([#20563](#20563)) ([0af8315](0af8315))
* rewrite query for postgres ([#20557](#20557)) ([#20559](#20559)) ([d754be5](d754be5))
* sending mails to unintended recipients as cc ([1c47643](1c47643))
* **UI:** align link cards & charts on workspace ([82cfd33](82cfd33))
* unsubscribe from list_update before resubbing ([#20450](#20450)) ([#20581](#20581)) ([7866605](7866605))
* use chart type passed to `render_graph` on form dashboards ([015f7db](015f7db))

### Features

* Disable Sharing globally (backport [#20318](#20318)) ([#20492](#20492)) ([67a537c](67a537c))
* list-view click and drag on check box to select multiple rows (backport [#20457](#20457)) ([#20568](#20568)) ([f757a37](f757a37))
* make workflow state translatable ([#20412](#20412)) ([8675789](8675789))
* **util:** `get_table_name`: wrap in backticks ([#20553](#20553)) ([#20556](#20556)) ([5c56dff](5c56dff))

### Performance Improvements

* Faster address query with explicit joins (backport [#20537](#20537)) ([#20540](#20540)) ([2ef7ef5](2ef7ef5))
* unsubscribe from list_update events ([#20423](#20423)) ([#20580](#20580)) ([8a63144](8a63144))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.31.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released Skip CI Doesn't run Ci for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants