Exemplo n.º 1
0
 def _query(self):
     query = BaseDao._query(self)
     if self.is_admin:
         return query
     elif self.authenticated_user:
         return query.filter_by(owner_id=self.authenticated_user.id)
     else:
         raise Exception # TODO
Exemplo n.º 2
0
 def _query(self):
     query = BaseDao._query(self)
     if self.is_admin:
         return query
     elif self.authenticated_user:
         return query.filter_by(owner_id=self.authenticated_user.id)
     else:
         raise Exception  # TODO
Exemplo n.º 3
0
 def _query(self):
     query = BaseDao._query(self)
     if self.is_admin:
         return query
     if self.authenticated_user:
         return query.filter(or_(
             (Talk.schedule_slot != None),
             (Talk.owner_id == self.authenticated_user.id)
         ))
     return query.filter(Talk.schedule_slot != None)
Exemplo n.º 4
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, User)
Exemplo n.º 5
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, User)
Exemplo n.º 6
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, Activation)
Exemplo n.º 7
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, ScheduleSlot)
Exemplo n.º 8
0
 def _query(self):
     query = BaseDao._query(self)
     return query
Exemplo n.º 9
0
 def __init__(self):
     BaseDao.__init__(self, User)
Exemplo n.º 10
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, Activation)
Exemplo n.º 11
0
 def __init__(self):
     BaseDao.__init__(self, Talk)
Exemplo n.º 12
0
 def __init__(self, authenticated_user):
     BaseDao.__init__(self, authenticated_user, ScheduleSlot)
Exemplo n.º 13
0
 def _query(self):
     query = BaseDao._query(self)
     return query