semantics
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
# #region CreateAdminScript [C:5] [TYPE Module] [SEMANTICS admin, search, user, cli]
|
||||
#
|
||||
# @BRIEF CLI tool for creating the initial admin user.
|
||||
# @LAYER: Infrastructure
|
||||
# @RELATION USES -> [AuthSecurityModule]
|
||||
# @RELATION USES -> [DatabaseModule]
|
||||
# @RELATION USES -> [AuthModels]
|
||||
# @LAYER Infrastructure
|
||||
# @RELATION CALLS -> [AuthSecurityModule]
|
||||
# @RELATION CALLS -> [DatabaseModule]
|
||||
# @RELATION CALLS -> [AuthModels]
|
||||
#
|
||||
# @INVARIANT: Admin user must have the "Admin" role.
|
||||
# @SIDE_EFFECT: Writes admin user to database
|
||||
# @DATA_CONTRACT: CLIArgs -> AdminUser
|
||||
# @INVARIANT Admin user must have the "Admin" role.
|
||||
# @SIDE_EFFECT Writes admin user to database
|
||||
# @DATA_CONTRACT CLIArgs -> AdminUser
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
@@ -26,8 +26,8 @@ from src.models.auth import Role, User
|
||||
|
||||
# #region create_admin [TYPE Function]
|
||||
# @BRIEF Creates an admin user and necessary roles/permissions.
|
||||
# @PRE: username and password provided via CLI.
|
||||
# @POST: Admin user exists in auth.db.
|
||||
# @PRE username and password provided via CLI.
|
||||
# @POST Admin user exists in auth.db.
|
||||
#
|
||||
def create_admin(username, password, email=None):
|
||||
seed_trace_id()
|
||||
|
||||
Reference in New Issue
Block a user