(core) Backend restrictions for raw data widgets

Summary:
Prevent most updates or removals of raw view sections and their fields in `useractions.py`. Only a fiew columns are allowed to be updated.

Removed the unused method `_UpdateViews` while I was at it.

Test Plan:
Added a Python test.

Tested manually that I can still make all expected changes, i.e. those allowed by the UI, e.g. reordering columns.

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3263
This commit is contained in:
Alex Hall
2022-02-14 14:25:52 +02:00
parent 2f6eafff35
commit c0ca936c1e
5 changed files with 111 additions and 23 deletions

View File

@@ -105,6 +105,9 @@ class MetaTableExtras(object):
class _grist_Views_section(object):
fields = _record_set('_grist_Views_section_field', 'parentId', sort_by='parentPos')
def isRaw(rec, table):
return rec.tableRef.rawViewSectionRef == rec
class _grist_Filters(object):
def setAutoRemove(rec, table):
"""Marks the filter for removal if its column no longer exists."""