diff --git a/redash/models.py b/redash/models.py index 062d23e9..1b0111e3 100644 --- a/redash/models.py +++ b/redash/models.py @@ -849,10 +849,6 @@ class AccessPermission(BaseModel): object_type=object_type, grantee=grantee, access_type=access_type) return permissions.count() > 0 - @staticmethod - def reset(object_type, object_id, access_type): - revoke_permission(object_type=object_type, object_id=object_id, access_type=access_type) - def to_dict(self): d = { 'id': self.id, @@ -866,7 +862,6 @@ class AccessPermission(BaseModel): class Change(BaseModel): - id = peewee.PrimaryKeyField() object_id = peewee.CharField(index=True) object_type = peewee.CharField(index=True) diff --git a/tests/handlers/test_access.py b/tests/handlers/test_access.py index e916feb3..b103fb35 100644 --- a/tests/handlers/test_access.py +++ b/tests/handlers/test_access.py @@ -2,6 +2,7 @@ from redash import models from tests import BaseTestCase from tests.test_handlers import AuthenticationTestMixin + class QueryAccessPermissionsTest(BaseTestCase, AuthenticationTestMixin): def setUp(self): self.paths = ['/api/queries/1/acl']