* fix: Ignore permissions while assigning if flag set
* fix: Avoid double permission checks on assignment rule
When it's triggered via doc events either:
- Permission check is done or
- Permission checks are not applicable
* 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>
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* fix: make automatically following documents optional
* fix: optimize email triggers for document followed
* test: add tests for document follow settings
* test: sync global search before testing
* fix: extend pypika's cast function to mimic varchar cast in MariaDB
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: phot0n <ritwikpuri5678@gmail.com>
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
* fix: seen notification logic
* fix: rename upcoming events to today's events, fix padding
* fix: truncate title
* fix: don't allow self notifications
* fix: don't check for same user for energy point notifications
* fix: codacy
* fix: truncate title client side
* fix: use data-action to mark as seen
* fix: don't send emails for auto energy points
* refactor: assignment rule and todo
* fix: updated query and enabled background jobs
* refactor: use ORM instead of SQL
* style: remove print statement
* refactor: minor change in tests
* style: updated query for getting todo