[Pkg-debile-commits] [debile-master] 01/01: Don't serialize passwords ! Add user serialization
Léo Cavaillé
leo.cavaille-guest at alioth.debian.org
Sun Aug 25 19:44:20 UTC 2013
This is an automated email from the git hooks/post-receive script.
leo.cavaille-guest pushed a commit to branch master
in repository debile-master.
commit d8a5510c33a468c1dee86d54b0b8744906b0e97c
Author: Léo Cavaillé <leo at cavaille.net>
Date: Sun Aug 25 21:42:07 2013 +0200
Don't serialize passwords ! Add user serialization
---
debile/master/orm.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/debile/master/orm.py b/debile/master/orm.py
index 9a5bcf8..7038c93 100644
--- a/debile/master/orm.py
+++ b/debile/master/orm.py
@@ -50,7 +50,9 @@ class User(Base):
admin = Column(Boolean)
def serialize(self):
- return row2dict(self)
+ r = row2dict(self)
+ r.pop("password", None)
+ return r
class Machine(Base):
@@ -76,7 +78,9 @@ class Machine(Base):
gpg_fingerprint = Column(String(100))
def serialize(self):
- return row2dict(self)
+ r = row2dict(self)
+ r.pop("password", None)
+ return r
class Group(Base):
@@ -166,6 +170,7 @@ class Source(Package):
def serialize(self):
source_dict = row2dict(self)
source_dict['type'] = 'source'
+ source_dict['user'] = self.user.serialize()
return source_dict
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git
More information about the Pkg-debile-commits
mailing list