* perf: `Document` objects without circular references
Circular references are usuallly considered bad for GC, avoiding them
since they don't seem to be necessary.
* fix: explicitly convert to weakref
* fix: set 2 as simultaneous_sessions by default
* fix: Correct offset for simultaneous_sessions
* refactor: use freeze_time instead of patching
* chore: misleading docstring
* test: set lower simultaneous_sessions for test
* Revert "fix(test_recorder): get the correct request (#24143)"
This reverts commit 745080c56e.
* test: disable recording before running assertions
* test: Dont set emails in test for broken email setup
* fix: status field should only be of type 'Select'/'Data'/'Check'
* chore: change code position
* fix: convert status field data to string to handle all cases
* chore: use cstr
---------
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
BREAKING CHANGE:
before: `has_permission` hooks need to explicitly return "False" to block a user.
after: `has_permission` hook need to explicitly return "True" (or truthy) value to allow user. They will be blocked otherwise.
Why? Everything related to permission should be block by default and allow if some checks pass.
* feat: permission debugger
This PR adds a virtual doctype that can run has_permission for
doctype-docname-user-ptype combinations and spit out detailed log for
why/where some permissionw as denied or granted.
This isn't supposed to be programatic, it's just textual dump of what code is doing.
IMO a better debugger can be written but that will require extensive
rewrite of perm checks first. All debugging, error messages in current
systems are bolted on top with hacks to avoid messing with
implementation.
* fix: capture UP pass check
* fix: reset docname on changing doctype
* fix: docname is optional
* fix: debug doctype perms
We set defaults on creation of new doc but when you append a new child
doc on existing document it doesn't seem to set the defaults.
This seems like a bug and not a deliberate choice.
* refactor(data_import): handle RQ timeouts better
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
* refactor(data_import): display count of documents even for timed out jobs
Also handle "0" cases better - should be plural there
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>