mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(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:
@@ -168,8 +168,7 @@ class TestDocModel(test_engine.EngineTestCase):
|
||||
view = self.engine.docmodel.views.lookupOne(id=1)
|
||||
self.assertRecordSet(view.viewSections, [1, 5, 6])
|
||||
|
||||
self.engine.docmodel.remove(f for vs in table.viewSections for f in vs.fields)
|
||||
self.engine.docmodel.remove(table.viewSections)
|
||||
self.engine.docmodel.remove(set(table.viewSections) - {table.rawViewSectionRef})
|
||||
self.assertRecordSet(view.viewSections, [6])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user