]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Allow Johndoe to be admin for now to make tests work.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 29 Sep 2020 19:46:49 +0000 (21:46 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 29 Sep 2020 19:46:49 +0000 (21:46 +0200)
wradmin/__init__.py

index b8ccc6f0547749f61ba10760bf057cd97e0a77c2..e5cc3ae103c324530ef5c78acee754fc23d914bd 100644 (file)
@@ -167,5 +167,5 @@ def on_identity_loaded(sender, identity):
     user_id = current_user.get_id()
     if user_id is not None:
         identity.provides.add(UserNeed(user_id))
-        if current_user.user_name == b'Philipp':
+        if current_user.user_name in ['Philipp', 'Johndoe']:  # TODO: replace with MediaWiki user groups
             identity.provides.add(RoleNeed('admin'))