TemporaryDocument lacks security context
Brought to you by:
ebrehault
in hidewhen_frmProjectFinance_isPlominoManager_formula
AttributeError: getCurrentUserRights
Context is <TemporaryDocument> 93184bb47ea6b57c6074870e4501d7a3
Code :
4: is_manager = "PlominoManager" in plominoDocument.getCurrentUserRights()
5: return not is_manager
true, because it does not acquire correctly from the db
wiser approach:
is_manager = "PlominoManager" in plominoDocument.getParentDatabase().getCurrentUserRights()
It's not possible to always give TemporaryDocument a security context using __of__?
When you create a form, you don't always know whether it will be used in a TemporaryDocument, and start to break.