(core) Remove the old attempt at ACLs implemented in Python.

Summary:
The new plans for granular access control are different and handled by
node.js. Some of the same tables will be reused, of which we never made
real use before except for expecting certain specific initial records.

This diff removes the old logic, replacing it with a stub that satisfies
the interface expected by other code.

It also removes several unused UserActions: AddUser/RemoveUser/
AddInstance/RemoveInstance.

Test Plan: Existing tests should pass.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2662
This commit is contained in:
Dmitry S
2020-11-11 23:56:05 -05:00
parent 5b2de988b5
commit 6b582b9ace
9 changed files with 31 additions and 1245 deletions

View File

@@ -215,9 +215,6 @@ class Engine(object):
# Locals dict for recently executed code in the REPL
self._repl = repl.REPLInterpreter()
# The single ACL instance for breaking up and validating actions according to permissions.
self._acl = acl.ACL(self.docmodel)
# Stores an exception representing the first unevaluated cell met while recomputing the
# current cell.
self._cell_required_error = None
@@ -996,9 +993,6 @@ class Engine(object):
# Update the context used for autocompletions.
self._autocomplete_context = AutocompleteContext(self.gencode.usercode.__dict__)
# TODO: Whenever schema changes, we need to adjust the ACL resources to remove or rename
# tableIds and colIds.
def _update_table_model(self, table, user_table):
"""
@@ -1120,7 +1114,8 @@ class Engine(object):
Splits ActionGroups, as returned e.g. from apply_user_actions, by permissions. Returns a
single ActionBundle containing of all of the original action_groups.
"""
return self._acl.acl_read_split(action_group)
# pylint:disable=no-self-use
return acl.acl_read_split(action_group)
def _apply_one_user_action(self, user_action):
"""