fix
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from io import DEFAULT_BUFFER_SIZE
|
||||
import os
|
||||
import json
|
||||
import requests
|
||||
@@ -99,7 +98,7 @@ for i in kanidm_users_raw:
|
||||
give_role(uid, None, False)
|
||||
userdata.remove(uid)
|
||||
|
||||
print("[DEBUG] ", users) # DEBUG
|
||||
print("[DEBUG]", users)
|
||||
|
||||
# Fetch RoleIDs
|
||||
cur = conn.cursor()
|
||||
@@ -110,8 +109,6 @@ roles = {}
|
||||
for i in roles_raw:
|
||||
roles[i[1]] = i[0]
|
||||
|
||||
print("[debug]", roles)
|
||||
|
||||
# Give roles
|
||||
for uid in users:
|
||||
if not users[uid]["isKanidmUser"]:
|
||||
@@ -124,7 +121,7 @@ for uid in users:
|
||||
roleid = "NULL"
|
||||
|
||||
sqlcommand = f"UPDATE users SET role_id = {roleid} WHERE id = {users[uid]["id"]};"
|
||||
print("[debug] SQL:", sqlcommand)
|
||||
print("[DEBUG] SQL:", sqlcommand)
|
||||
cur.execute(sqlcommand)
|
||||
|
||||
conn.commit()
|
||||
|
@@ -96,8 +96,8 @@ in
|
||||
smtp = {
|
||||
createLocally = false;
|
||||
|
||||
fromAddress = "mastodon@${sp.domain}";
|
||||
user = "mastodon";
|
||||
fromAddress = "noreply.mastodon@${sp.domain}";
|
||||
user = "noreply.mastodon";
|
||||
passwordFile = secrets.passwordFile;
|
||||
authenticate = true;
|
||||
|
||||
@@ -117,7 +117,8 @@ in
|
||||
users.users.mastodon.isSystemUser = lib.mkForce false;
|
||||
users.users.mastodon.isNormalUser = lib.mkForce true;
|
||||
|
||||
selfprivacy.emails."mastodon" = {
|
||||
users.users."noreply.mastodon".isNormalUser = true;
|
||||
selfprivacy.emails."noreply.mastodon" = {
|
||||
hashedPasswordFile = secrets.hashedPasswordFile;
|
||||
systemdTargets = [ "mastodon-email-password-setup.service" ];
|
||||
sendOnly = true;
|
||||
|
Reference in New Issue
Block a user