diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-18 08:59:13 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-18 08:59:13 +0100 |
commit | 2e5a241777ef0bb0d76420d39bf3be41e16e042a (patch) | |
tree | 3223b8fba4fa244fa97b0df0b8bf8c5b91aeffec /src/web/models | |
parent | Check if the id of the category is '0'. (diff) | |
download | newspipe-2e5a241777ef0bb0d76420d39bf3be41e16e042a.tar.gz newspipe-2e5a241777ef0bb0d76420d39bf3be41e16e042a.tar.bz2 newspipe-2e5a241777ef0bb0d76420d39bf3be41e16e042a.zip |
New management of the token for the account confirmation.
Diffstat (limited to 'src/web/models')
-rw-r--r-- | src/web/models/__init__.py | 2 | ||||
-rw-r--r-- | src/web/models/user.py | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/web/models/__init__.py b/src/web/models/__init__.py index e6615ab4..d9489dbb 100644 --- a/src/web/models/__init__.py +++ b/src/web/models/__init__.py @@ -96,7 +96,7 @@ def db_create(db): "root@jarr.localhost"), pwdhash=generate_password_hash( os.environ.get("ADMIN_PASSWORD", "password")), - activation_key="") + enabled=True) user1.roles.extend([role_admin, role_user]) db.session.add(user1) diff --git a/src/web/models/user.py b/src/web/models/user.py index cdbfb457..1a276f7e 100644 --- a/src/web/models/user.py +++ b/src/web/models/user.py @@ -45,8 +45,7 @@ class User(db.Model, UserMixin): email = db.Column(db.String(254), index=True, unique=True) pwdhash = db.Column(db.String()) roles = db.relationship('Role', backref='user', lazy='dynamic') - activation_key = db.Column(db.String(128), default=hashlib.sha512( - str(random.getrandbits(256)).encode("utf-8")).hexdigest()[:86]) + enabled = db.Column(db.Boolean(), default=False) date_created = db.Column(db.DateTime(), default=datetime.now) last_seen = db.Column(db.DateTime(), default=datetime.now) feeds = db.relationship('Feed', backref='subscriber', lazy='dynamic', |