Esempio n. 1
0
 def is_allowed(self, user=None, api_key=None, read=False, write=False, delete=False):
     for dataset in self.datasets:
         dataset = DataSet.get_by_id(dataset)
         self.log.info('name = %s, key = %s' % (dataset.name, dataset.encode()))
         if not dataset.is_allowed(user=user, api_key=api_key, read=read, write=write, delete=delete):
             return False
     return True
Esempio n. 2
0
 def datasets(self):
     from lexigraph.model.db import DataSet
     return DataSet.all().filter('account =', self)