gristlabs_grist-core/sandbox/grist
Alex Hall 8ee23f5344 (core) Mark column changing actions as indirect when adding data to empty column
Summary:
Fixing https://gristlabs.getgrist.com/doc/check-ins/p/12#a1.s19.r1045.c19 :

> Problem: user creates fresh new empty column. Users with access to write to that column, but not modify schema, will not in fact be able to write into it (since on first data entry column type needs to change). Experience is confusing.

Refactored `enter_indirection` and `leave_indirection` to a single context manager method for use with `with` instead of `try/finally`.

Used the new method in `_ensure_column_accepts_data` around column changing actions converting empty column to data column.

Test Plan:
Updated a Python test, reflecting that the correct actions are now marked as direct=False.

Tested manually that I can now add data to a blank column without schema access, while I wasn't able to before, and I still can't make other schema changes.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3446
2022-05-25 16:21:04 +02:00
..
functions (core) Update the current time in formulas automatically every hour 2022-04-28 21:07:40 +02:00
imports (core) Convert row tuples to lists to fix excel import error 2022-05-17 22:40:46 +02:00
acl_formula.py
acl.py
action_obj.py
action_summary.py
actions.py
autocomplete_context.py
codebuilder.py (core) Ensure formulas return something and don't assign to attributes of rec 2022-05-23 21:06:18 +02:00
column.py
csv_patch.py
depend.py
docactions.py
docmodel.py (core) Conditional formatting rules 2022-03-23 13:15:02 +01:00
engine.py (core) Prevent rebuilding usercode for every AddColumn when importing 2022-05-24 22:29:20 +02:00
gencode.py
gpath.py
grist.py
identifiers.py
import_actions.py (core) Prevent rebuilding usercode for every AddColumn when importing 2022-05-24 22:29:20 +02:00
logger.py
lookup.py (core) Make lookups depend on all rows 2022-03-14 19:42:51 +02:00
main.py (core) Show proper message on empty Excel import, rather than a code error 2022-04-27 00:49:28 -04:00
match_counter.py
migrations.py (core) Distinct style rules for summary columns 2022-04-27 20:51:23 +02:00
moment.py
objtypes.py
parse_data.py (core) Switch excel import parsing from messytables+xlrd to openpyxl, and ignore empty rows 2022-05-12 14:43:21 +02:00
records.py
relabeling.py
relation.py
runtests.py
sandbox.py
schema.py (core) Distinct style rules for summary columns 2022-04-27 20:51:23 +02:00
sort_specs.py
summary.py (core) Distinct style rules for summary columns 2022-04-27 20:51:23 +02:00
table_data_set.py
table.py (core) Mark column changing actions as indirect when adding data to empty column 2022-05-25 16:21:04 +02:00
test_acl_formula.py
test_acl_renames.py
test_actions.py
test_codebuilder.py (core) Ensure formulas return something and don't assign to attributes of rec 2022-05-23 21:06:18 +02:00
test_column_actions.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_completion.py
test_default_formulas.py
test_depend.py
test_derived.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_display_cols.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_docmodel.py
test_engine.py
test_find_col.py
test_formula_error.py (core) Ensure formulas return something and don't assign to attributes of rec 2022-05-23 21:06:18 +02:00
test_formula_undo.py (core) Mark column changing actions as indirect when adding data to empty column 2022-05-25 16:21:04 +02:00
test_functions.py
test_gencode.py
test_gpath.py
test_import_actions.py
test_logger.py
test_lookups.py
test_match_counter.py
test_migrations.py
test_moment.py
test_record_func.py
test_recordlist.py (core) Return RecordSet instead of list from property access when possible, to allow further property access 2022-04-05 18:05:00 +02:00
test_reflist_rel.py
test_relabeling.py
test_renames2.py
test_renames.py
test_replay.py
test_rules.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_side_effects.py (core) Ensure formulas return something and don't assign to attributes of rec 2022-05-23 21:06:18 +02:00
test_sort_spec.py
test_summary2.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_summary_choicelist.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_summary_undo.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_summary.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_table_actions.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_table_data_set.py
test_temp_rowids.py
test_textbuilder.py
test_treeview.py
test_trigger_formulas.py
test_twowaymap.py
test_types.py
test_undo.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
test_urllib_patch.py
test_user.py
test_useractions.py (core) Updating RawData views 2022-05-04 21:41:42 +02:00
testsamples.py
testscript.json (core) Updating RawData views 2022-05-04 21:41:42 +02:00
testutil.py
textbuilder.py
treeview.py
twowaymap.py
tzdata.data
urllib_patch.py
user.py
useractions.py (core) Mark column changing actions as indirect when adding data to empty column 2022-05-25 16:21:04 +02:00
usercode.py
usertypes.py
xmlrunner.py