update of an outadet approach of the user adding in the current version
This commit is contained in:
@@ -246,21 +246,6 @@ page_permissions = {
|
||||
"manage_locations": True,
|
||||
}
|
||||
|
||||
if db.users.count_documents({"username": dp.encrypt_text("admin")}) == 0:
|
||||
db.users.insert_one({
|
||||
"Username": dp.encrypt_text("admin"),
|
||||
"Password": hashed_pw_string,
|
||||
"Admin": True,
|
||||
"active_ausleihung": None,
|
||||
"name": dp.encrypt_text("Admin"),
|
||||
"last_name": dp.encrypt_text("User"),
|
||||
"IsStudent": False,
|
||||
"PermissionPreset": "full_access",
|
||||
"ActionPermissions": action_permissions,
|
||||
"PagePermissions": page_permissions,
|
||||
})
|
||||
print("User correctly added")
|
||||
|
||||
if db.users.count_documents({"Username": dp.encrypt_text("admin")}) == 0:
|
||||
us.add_user("admin", "admin123", "admin", "admin", permission_preset='full_access')
|
||||
us.make_admin("admin")
|
||||
|
||||
Reference in New Issue
Block a user