* fix(utils): add type hints to whitelisted methods
* fix(desktop): add type hints to whitelisted methods
* fix(listview): add type hints to whitelisted methods
* fix(access_log): add type hints to whitelisted methods
* fix(setup_wizard): add type hints to whitelisted methods
* fix(notification_settings): add type hints to whitelisted methods
* fix(calendar): add type hints to whitelisted methods
* fix(notifications): add type hints to whitelisted methods
* fix(query_report): add type hints to whitelisted methods
* fix(load): add type hints to whitelisted methods
* fix(save): add type hints to whitelisted methods
* fix(user): add type hints to whitelisted methods
* fix: correct Document import
* fix(list_view_settings): add type hints to whitelisted methods
* fix(reportview): add type hints to whitelisted methods
* fix(treeview): add type hints to whitelisted methods
* fix(linked_with): add type hints to whitelisted methods
* fix(bulk_update): add type hints to whitelisted methods
* fix(assign_to): add type hints to whitelisted methods
* fix(workspace): add type hints to whitelisted methods
* fix(kanban_board): add type hints to whitelisted methods
* fix(event): add type hints to whitelisted methods
* fix(email): add type hints to whitelisted methods
* fix(exporter): add type hints to whitelisted methods
* fix(permission_manager): add type hints to whitelisted methods
* fix(dashboard_chart): add type hints to whitelisted methods
* fix(number_card): add type hints to whitelisted methods
* fix(tag): add type hints to whitelisted methods
* fix: add hook to force type hints on all whitelisted endpoints
* fix: target_doc can be dict/json string
* fix: doc can be dict/json string
* fix(tests): add type hints to whitelisted methods in test
* fix: tree method is optional
* test: Fix test api types
* chore: drop dead code
* fix: document can be int
* fix: Number card input can be document
As utils in some other API calls
* fix: Always use session user
The only usage of this API that makes sense.
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
* feat: allow users to email prepared report
* fix: add export in background checkbox in export dialog
* chore: use a common function to send report email
* feat: delete generated files from system after user defined duration
* feat: add exported reports in a folder and periodically clean it
* test: add test for export via report
* fix: add exported folder path as constant
* chore: un-edit report.json
* refactor: for readability
* chore: type hint
* refactor: let the BG job fail if email fails
* refactor: consistent `report_name`
* it reads better now, e.g. attached_to_name=report_name instead of attached_to_name=title
* refactor: `return_file` to its inverse `populate_response`
* chore: more specific error message
---------
Co-authored-by: Rahul Agrawal <deathstarconsole@Rahuls-MacBook-Air.local>
Co-authored-by: Hussain Nagaria <hussainbhaitech@gmail.com>
* refactor(user-invitation): validate invite role based on user's roles
* refactor(user-invitation): start error msgs with a capital letter
* docs(user-invitation): update the hooks structure
- Abstract SQLiteSearch base class with full-text search
- Spelling correction, recency boosting, and custom scoring
- Supports search filtering and configurable document indexing
- hooks for auto-indexing
- build index after migrate
- build index (if not exists) every 15 mins
- update doc index on_update
- remove doc index on_trash
* feat: add user invitation doctype & related public methods
* style(user-invitation): execute formatters & add semgrep comments
* refactor(user-invitation): use `is` to compare `None` values
* fix(user-invitation): skip fetching `after_accept` for default app
* fix(user-invitation): translate email templates
* fix(user-invitaton): return pending invites from invite by email api
* refactor(user-invitation): improve code quality
* fix(user-invitation): translate all error messages
* refactor(user-invitation): improve security & readability
Improvements:
- move invite expiration check to `daily_maintenance`
- explicitly import all of the used packages
- specify methods for all security-critical endpoints
- improve error messages and give them suitable titles
- remove unnecessary utility functions
- make invitation key management secure
- translate all of the subjects of the sent emails
- use the `app_title` hook to create email titles
- commit the work done after each iteration of the background invitation
expiry checker
- restructure code to improve readability
- use `user.reset_password` to generate the target link
- use clear long names to name identifiers
- add document states with relevant colors (User Invitation doctype)
- differ `sendmail` emails whenever possible
- send an email to the invitation creator instead of the invitee after
the invite has expired
- remove `User Invitation Manager` role
* fix(user-invitation): use valid emails to test doctype & related code
* feat(user-invitation): support adding multiple roles
* refactor(user-invitation): mark relevant fields `set only once`
* feat(user-invitation): add `Cancelled` status
* test(user-invitation): correct broken tests
* test(user-invitation): form valid f-strings & run code formatter
* feat(user-invitation): make doctype usable from desk
* fix(user-invitation): remove delete permission from invitation doctype
* feat(user-invitation): pass user inserted info to `after_accept` hook
* refactor(user-invitation): improve custom action methods & errors
Improvements:
- trigger actions only when the invitation is in the `Pending` state
- use lowercase letters to start error messages
- handle cases where `user_invitation_hook` is not defined
* refactor(user-invitation): remove site name from email templates
* docs(user-invitation): add internal documentation
* feat(user-invitation): add 'get pending' & cancel invites apis
* fix(user-invitation): make invitation app specific
* refactor(user-invitation): avoid mixing function programming
* fix(user-invitation): make apis usable for app specific valid users
* fix(user-invitation): allow app specific invites
* feat(user-invitation): make list view & permission checks app specific
* refactor(user-invitation): convert class methods to static when possible
* feat(user-invitation): add `app_only_for` method to the doc
* fix(user-invitation): f-string syntax error in `get_permission_query_conditions`
* docs(user-invitation): add examples & improve the internal doc
* refactor: rename method name
static_ is unnecessary
only_for doesn't make sense in this context when arguments are not roles
* fix: Support POST request too
We dont follow REST semantics 100%, anything that modifies something
should ideally be doable with POST too.
* chore: cap
* fix: Avoid ignore_permissions as user arg
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: remove doctypes,workspace blocks, files
* fix: minor python tests and UI tests
* fix: remove blog post from tests
* fix: remove blogger as role for tests
* fix: add check for if doctype exists
* fix: ui test
* fix: more cleanup
* fix: cleanup comments and fix test_query
* fix: resolve conflicts
* fix: add warning and handle comments
We recently applied limit on how many links can be buffered. That
pretty much "samples" only records created at start of the hour.
This change makes it flush 4x frequently and samples 10% of input to
reduce updates. Again, statistically this serves same purpose.