Skip to content
Snippets Groups Projects
Verified Commit 2f47a2f7 authored by Mark's avatar Mark
Browse files

Add dummy role

parent b6627528
No related branches found
No related tags found
No related merge requests found
......@@ -2,10 +2,10 @@ from flask import abort, Flask, redirect, request
from os import urandom
from hydra_client import HydraAdmin
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.ext.hybrid import hybrid_property, hybrid_method
from flask_security import Security, SQLAlchemyUserDatastore, \
UserMixin, login_required, current_user
HYDRA_ADMIN_URL = "http://127.0.0.1:4445"
app = Flask(__name__)
......@@ -24,8 +24,16 @@ class User(db.Model, UserMixin):
active = db.Column(db.Boolean())
confirmed_at = db.Column(db.DateTime())
@hybrid_property
def roles(self):
return []
@roles.setter
def roles(self, role):
pass
# Setup Flask-Security
user_datastore = SQLAlchemyUserDatastore(db, User)
user_datastore = SQLAlchemyUserDatastore(db, User, None)
security = Security(app, user_datastore)
# Create a user to test with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment