mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Update admin user settings
This commit is contained in:
		@@ -1,8 +1,5 @@
 | 
			
		||||
from flask import Blueprint
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
USERNAME_REGEX = '^[A-Za-zÄÖÜäöüß0-9_.]*$'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bp = Blueprint('auth', __name__)
 | 
			
		||||
from . import routes
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@ from wtforms import (
 | 
			
		||||
from wtforms.validators import InputRequired, Email, EqualTo, Length, Regexp
 | 
			
		||||
from app.forms import NopaqueForm
 | 
			
		||||
from app.models import User
 | 
			
		||||
from . import USERNAME_REGEX
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class RegistrationForm(NopaqueForm):
 | 
			
		||||
@@ -22,7 +21,7 @@ class RegistrationForm(NopaqueForm):
 | 
			
		||||
            InputRequired(),
 | 
			
		||||
            Length(max=64),
 | 
			
		||||
            Regexp(
 | 
			
		||||
                USERNAME_REGEX,
 | 
			
		||||
                User.username_pattern,
 | 
			
		||||
                message=(
 | 
			
		||||
                    'Usernames must have only letters, numbers, dots or '
 | 
			
		||||
                    'underscores'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user