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