ciclos

commit 720a3bcf62709c3f82908bfdbc48611e10d595b9

Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>

Add is admin ss (simple and stupid) checking

 src/types/user.py | 4 ++++


diff --git a/src/types/user.py b/src/types/user.py
index 4c4c77772b35b4424690d9782463103a2cf832ed..9f3f405fe145f8d1dc18d43b1687cecb1a791f32 100644
--- a/src/types/user.py
+++ b/src/types/user.py
@@ -28,6 +28,10 @@     def create(self):
         db.session.add(self)
         db.session.commit()
 
+    def is_admin(self):
+        # TODO: Move this to a field on the database
+        return self.email in ["pedrolucasporcellis@gmail.com"]
+
     def current_order(self):
         return Order.query.join(User).join(Cycle).filter(User.id == self.id, Cycle.status == CycleStatus.published).first()