]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/model/__init__.py
Now the tests pass - MwUser class had to be modified.
[philipp/winterrodeln/wradmin.git] / wradmin / model / __init__.py
index 355253daa8b4b154fef8f2810dad0cda5ac63dda..b55cc98e3b772df2931fe05b0d8347a544d24afa 100644 (file)
@@ -1,5 +1,6 @@
 """Model of wradmin"""
 from sqlalchemy import orm
+from flask_login import UserMixin
 from wradmin.model import meta
 from wrpylib import mwdb, wrmwdb
 
@@ -54,18 +55,9 @@ class MwText(object):
 
 
 # MediaWiki user table
-class MwUser:
-    def is_authenticated(self):
-        return False
-
-    def is_active(self):
-        return True
-
-    def is_anonymous(self):
-        return True
-
+class MwUser(UserMixin):
     def get_id(self):
-        return '1'
+        return str(self.user_id)
 
 
 orm.mapper(WrReport, wrreport_table)