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:
		@@ -2,7 +2,6 @@ from apifairy.fields import FileField
 | 
			
		||||
from marshmallow import validate, validates, ValidationError
 | 
			
		||||
from marshmallow.decorators import post_dump
 | 
			
		||||
from app import ma
 | 
			
		||||
from app.auth import USERNAME_REGEX
 | 
			
		||||
from app.models import (
 | 
			
		||||
    Job,
 | 
			
		||||
    JobStatus,
 | 
			
		||||
@@ -142,7 +141,10 @@ class UserSchema(ma.SQLAlchemySchema):
 | 
			
		||||
    username = ma.auto_field(
 | 
			
		||||
        validate=[
 | 
			
		||||
            validate.Length(min=1, max=64),
 | 
			
		||||
            validate.Regexp(USERNAME_REGEX, error='Usernames must have only letters, numbers, dots or underscores')
 | 
			
		||||
            validate.Regexp(
 | 
			
		||||
                User.username_pattern,
 | 
			
		||||
                error='Usernames must have only letters, numbers, dots or underscores'
 | 
			
		||||
            )
 | 
			
		||||
        ]
 | 
			
		||||
    )
 | 
			
		||||
    email = ma.auto_field(validate=validate.Email())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user