# User > God node · 19 connections · [/home/scheianu/digiserver-v2/app/models/user.py](file:///home/scheianu/digiserver-v2/app/models/user.py#L10) ## Call Trace Diagram ```mermaid sequenceDiagram participant P0 as User participant P1 as Models package for digiserver-v2. participant P2 as PlayerEdit participant P3 as receive_edited_media() participant P4 as Admin blueprint for user management and system settings. participant P5 as Decorator to require admin role for route access. participant P6 as Display admin panel with system overview. participant P7 as Create a new user account. participant P8 as Change user role between user and admin. participant P9 as Delete a user account. participant P10 as Change application theme. participant P11 as Upload custom logo for application. participant P12 as Clear all server logs. participant P13 as Display user management page. participant P14 as Get system information as JSON. participant P15 as Display leftover media files not assigned to any playlist. participant P16 as Delete all leftover images that are not part of any playlist participant P17 as Delete all leftover videos that are not part of any playlist participant P18 as Delete a single leftover content file participant P19 as Show system dependencies status. participant P20 as Install LibreOffice for PPTX conversion. participant P21 as Install Emoji Fonts for better UI display. participant P22 as Logo customization page. participant P23 as Upload login page logo. participant P24 as Display and manage users that edit images on players. participant P25 as Update editing user name. participant P26 as Display HTTPS configuration management page. participant P27 as Update HTTPS configuration. participant P28 as Get current HTTPS configuration status as JSON. participant P29 as Path to the persisted player-build settings (in the instance folder). participant P30 as Display the 'Build player files for deployment' admin page. participant P31 as Build/refresh the staged player code and/or write its base config. participant P32 as API blueprint for REST endpoints and player communication. participant P33 as Rate limiting decorator. Args: max_requests: Maximum number of participant P34 as Decorator to verify player authentication via auth code. participant P35 as API health check endpoint. participant P36 as Get server SSL certificate. participant P37 as Authenticate a player and return auth code and configuration. Request J participant P38 as Verify an auth code and return player information. Request JSON: participant P39 as Get playlist using hostname and quickconnect code (Kivy player compatible). participant P40 as Get playlist for a specific player. Requires player authentication via participant P41 as Get current playlist version for a player. Lightweight endpoint for pla participant P42 as Get cached playlist for a player based on assigned playlist. participant P43 as Receive feedback/status updates from players (Kivy player compatible). participant P44 as Get current status of a player (public endpoint for monitoring). participant P45 as Get progress of a file upload. participant P46 as Get system information and statistics. participant P47 as List all content with basic information. participant P48 as Get recent server logs. Query parameters: limit: Number of logs participant P49 as Receive edited media from player. Expected multipart/form-data: - i participant P50 as Test SSH connection to a remote host. Request JSON: hostname: T participant P51 as Deploy player code to a remote host via SSH. Request JSON: host participant P52 as Handle 404 errors in API. participant P53 as Handle 405 errors in API. participant P54 as Handle 500 errors in API. participant P55 as Players blueprint for player management and display. participant P56 as Display list of all players. participant P57 as Add a new player with optional SSH deployment. participant P58 as Regenerate authentication code for a player. participant P59 as Redirect to manage player page (combined view). participant P60 as Manage player - edit credentials, assign playlist, view logs. participant P61 as Display all edited media files from this player. participant P62 as Display a tabular report of all edited media from this player. participant P63 as Display player fullscreen view (no authentication required for players). participant P64 as Get playlist for a player based on their assigned playlist. Args: participant P65 as Legacy endpoint - Content reordering now handled in playlist management. participant P66 as Delete multiple players at once. participant P67 as Assign multiple players to a playlist. participant P68 as Return deployment status for all players (used by polling JS). participant P69 as Reorder items in player's playlist. participant P70 as Remove content from player's playlist. participant P71 as Content model for media files. participant P72 as Main playlist management page. participant P73 as View all media files in the library. participant P74 as Delete a media file and remove it from all playlists. participant P75 as Create a new playlist. participant P76 as Manage content in a specific playlist. participant P77 as Add content to playlist. participant P78 as Create a web link content item from the Upload Media page. Optionally adds participant P79 as Create a web link content item and add it to the playlist. participant P80 as Remove content from playlist. participant P81 as Remove multiple content items from playlist. participant P82 as Reorder content in playlist. participant P83 as Update content muted setting in playlist. participant P84 as Update content edit_on_player_enabled setting in playlist. participant P85 as Update content duration in playlist. participant P86 as Display upload media page. participant P87 as Process and optimize image files. participant P88 as Process and optimize video files for Raspberry Pi playback. participant P89 as Process PDF files by converting each page to PNG images. participant P90 as Process large files (PDF, PPTX, Video) in background thread. participant P91 as Process PowerPoint presentation files by converting slides to images. participant P92 as Create a Full HD (1920x1080) image from PIL Image object, centered on white back participant P93 as Resize image to exactly Full HD (1920x1080) maintaining aspect ratio with center participant P94 as Optimize and resize image file to Full HD (1920x1080) maintaining aspect ratio. participant P95 as Upload media files to library with type-specific processing. participant P96 as Assign a player to a playlist. participant P97 as PlayerUser participant P98 as Playlist participant P99 as HTTPSConfig participant P100 as Content participant P101 as Player participant P102 as ServerLog participant P103 as Group participant P104 as PlayerFeedback participant P105 as DigiServer v2 - Application Factory Modern Flask application with blueprint arch participant P106 as Application factory pattern Args: config_name: Configuration en participant P107 as Register application blueprints participant P108 as Configure Flask-Login participant P109 as Register error handlers participant P110 as Register CLI commands participant P111 as Register context processors for templates participant P112 as Register custom Jinja2 template filters participant P113 as create_user() participant P114 as Portal SSO middleware for DigiServer v2. When the umbrella nginx verifies the p participant P115 as Register the SSO before_request handler on the given Flask app. participant P116 as register() participant P117 as _get_or_create_user() P0->>+ P1: uses P1-->>- P0: return P1->>+ P2: uses P2-->>- P1: return P2->>+ P1: uses P1-->>- P2: return P2->>+ P3: calls P3-->>- P2: return P2->>+ P4: uses P4-->>- P2: return P2->>+ P5: uses P5-->>- P2: return P2->>+ P6: uses P6-->>- P2: return P2->>+ P7: uses P7-->>- P2: return P2->>+ P8: uses P8-->>- P2: return P2->>+ P9: uses P9-->>- P2: return P2->>+ P10: uses P10-->>- P2: return P2->>+ P11: uses P11-->>- P2: return P2->>+ P12: uses P12-->>- P2: return P2->>+ P13: uses P13-->>- P2: return P2->>+ P14: uses P14-->>- P2: return P2->>+ P15: uses P15-->>- P2: return P2->>+ P16: uses P16-->>- P2: return P2->>+ P17: uses P17-->>- P2: return P2->>+ P18: uses P18-->>- P2: return P2->>+ P19: uses P19-->>- P2: return P2->>+ P20: uses P20-->>- P2: return P2->>+ P21: uses P21-->>- P2: return P2->>+ P22: uses P22-->>- P2: return P2->>+ P23: uses P23-->>- P2: return P2->>+ P24: uses P24-->>- P2: return P2->>+ P25: uses P25-->>- P2: return P2->>+ P26: uses P26-->>- P2: return P2->>+ P27: uses P27-->>- P2: return P2->>+ P28: uses P28-->>- P2: return P2->>+ P29: uses P29-->>- P2: return P2->>+ P30: uses P30-->>- P2: return P2->>+ P31: uses P31-->>- P2: return P2->>+ P32: uses P32-->>- P2: return P2->>+ P33: uses P33-->>- P2: return P2->>+ P34: uses P34-->>- P2: return P2->>+ P35: uses P35-->>- P2: return P2->>+ P36: uses P36-->>- P2: return P2->>+ P37: uses P37-->>- P2: return P2->>+ P38: uses P38-->>- P2: return P2->>+ P39: uses P39-->>- P2: return P2->>+ P40: uses P40-->>- P2: return P2->>+ P41: uses P41-->>- P2: return P2->>+ P42: uses P42-->>- P2: return P2->>+ P43: uses P43-->>- P2: return P2->>+ P44: uses P44-->>- P2: return P2->>+ P45: uses P45-->>- P2: return P2->>+ P46: uses P46-->>- P2: return P2->>+ P47: uses P47-->>- P2: return P2->>+ P48: uses P48-->>- P2: return P2->>+ P49: uses P49-->>- P2: return P2->>+ P50: uses P50-->>- P2: return P2->>+ P51: uses P51-->>- P2: return P2->>+ P52: uses P52-->>- P2: return P2->>+ P53: uses P53-->>- P2: return P2->>+ P54: uses P54-->>- P2: return P2->>+ P55: uses P55-->>- P2: return P2->>+ P56: uses P56-->>- P2: return P2->>+ P57: uses P57-->>- P2: return P2->>+ P58: uses P58-->>- P2: return P2->>+ P59: uses P59-->>- P2: return P2->>+ P60: uses P60-->>- P2: return P2->>+ P61: uses P61-->>- P2: return P2->>+ P62: uses P62-->>- P2: return P2->>+ P63: uses P63-->>- P2: return P2->>+ P64: uses P64-->>- P2: return P2->>+ P65: uses P65-->>- P2: return P2->>+ P66: uses P66-->>- P2: return P2->>+ P67: uses P67-->>- P2: return P2->>+ P68: uses P68-->>- P2: return P2->>+ P69: uses P69-->>- P2: return P2->>+ P70: uses P70-->>- P2: return P2->>+ P71: uses P71-->>- P2: return P2->>+ P72: uses P72-->>- P2: return P2->>+ P73: uses P73-->>- P2: return P2->>+ P74: uses P74-->>- P2: return P2->>+ P75: uses P75-->>- P2: return P2->>+ P76: uses P76-->>- P2: return P2->>+ P77: uses P77-->>- P2: return P2->>+ P78: uses P78-->>- P2: return P2->>+ P79: uses P79-->>- P2: return P2->>+ P80: uses P80-->>- P2: return P2->>+ P81: uses P81-->>- P2: return P2->>+ P82: uses P82-->>- P2: return P2->>+ P83: uses P83-->>- P2: return P2->>+ P84: uses P84-->>- P2: return P2->>+ P85: uses P85-->>- P2: return P2->>+ P86: uses P86-->>- P2: return P2->>+ P87: uses P87-->>- P2: return P2->>+ P88: uses P88-->>- P2: return P2->>+ P89: uses P89-->>- P2: return P2->>+ P90: uses P90-->>- P2: return P2->>+ P91: uses P91-->>- P2: return P2->>+ P92: uses P92-->>- P2: return P2->>+ P93: uses P93-->>- P2: return P2->>+ P94: uses P94-->>- P2: return P2->>+ P95: uses P95-->>- P2: return P2->>+ P96: uses P96-->>- P2: return P1->>+ P97: uses P97-->>- P1: return P1->>+ P98: uses P98-->>- P1: return P1->>+ P99: uses P99-->>- P1: return P1->>+ P100: uses P100-->>- P1: return P1->>+ P0: uses P0-->>- P1: return P1->>+ P101: uses P101-->>- P1: return P1->>+ P102: uses P102-->>- P1: return P1->>+ P103: uses P103-->>- P1: return P1->>+ P104: uses P104-->>- P1: return P0->>+ P105: uses P105-->>- P0: return P0->>+ P106: uses P106-->>- P0: return P0->>+ P107: uses P107-->>- P0: return P0->>+ P108: uses P108-->>- P0: return P0->>+ P109: uses P109-->>- P0: return P0->>+ P110: uses P110-->>- P0: return P0->>+ P111: uses P111-->>- P0: return P0->>+ P112: uses P112-->>- P0: return P0->>+ P113: calls P113-->>- P0: return P0->>+ P114: uses P114-->>- P0: return P0->>+ P115: uses P115-->>- P0: return P0->>+ P116: calls P116-->>- P0: return P0->>+ P117: calls P117-->>- P0: return ``` ## Connections by Relation ### calls - [[create_user()]] `INFERRED` - [[register()]] `INFERRED` - [[_get_or_create_user()]] `INFERRED` ### contains - [[user.py]] `EXTRACTED` ### inherits - [[UserMixin]] `EXTRACTED` ### method - [[.__repr__()]] `EXTRACTED` - [[.update_last_login()]] `EXTRACTED` ### rationale_for - [[User model for application authentication. Attributes: id: Prim]] `EXTRACTED` ### uses - [[Models package for digiserver-v2.]] `INFERRED` - [[DigiServer v2 - Application Factory Modern Flask application with blueprint arch]] `INFERRED` - [[Application factory pattern Args: config_name: Configuration en]] `INFERRED` - [[Register application blueprints]] `INFERRED` - [[Configure Flask-Login]] `INFERRED` - [[Register error handlers]] `INFERRED` - [[Register CLI commands]] `INFERRED` - [[Register context processors for templates]] `INFERRED` - [[Register custom Jinja2 template filters]] `INFERRED` - [[Portal SSO middleware for DigiServer v2. When the umbrella nginx verifies the p]] `INFERRED` - [[Register the SSO before_request handler on the given Flask app.]] `INFERRED` --- *Part of the graphify knowledge wiki. See [[index]] to navigate.*