Remove unused method

This commit is contained in:
Arik Fraimovich 2016-10-24 13:37:32 +03:00
parent 00a77f8d3a
commit 7ba5a2062a
2 changed files with 1 additions and 5 deletions

View File

@ -849,10 +849,6 @@ class AccessPermission(BaseModel):
object_type=object_type, grantee=grantee, access_type=access_type) object_type=object_type, grantee=grantee, access_type=access_type)
return permissions.count() > 0 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): def to_dict(self):
d = { d = {
'id': self.id, 'id': self.id,
@ -866,7 +862,6 @@ class AccessPermission(BaseModel):
class Change(BaseModel): class Change(BaseModel):
id = peewee.PrimaryKeyField() id = peewee.PrimaryKeyField()
object_id = peewee.CharField(index=True) object_id = peewee.CharField(index=True)
object_type = peewee.CharField(index=True) object_type = peewee.CharField(index=True)

View File

@ -2,6 +2,7 @@ from redash import models
from tests import BaseTestCase from tests import BaseTestCase
from tests.test_handlers import AuthenticationTestMixin from tests.test_handlers import AuthenticationTestMixin
class QueryAccessPermissionsTest(BaseTestCase, AuthenticationTestMixin): class QueryAccessPermissionsTest(BaseTestCase, AuthenticationTestMixin):
def setUp(self): def setUp(self):
self.paths = ['/api/queries/1/acl'] self.paths = ['/api/queries/1/acl']