]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
(no commit message)
authoranarcat <anarcat@web>
Sat, 23 May 2020 15:09:59 +0000 (11:09 -0400)
committeradmin <admin@branchable.com>
Sat, 23 May 2020 15:09:59 +0000 (11:09 -0400)
doc/tips/user_command.mdwn [new file with mode: 0644]

diff --git a/doc/tips/user_command.mdwn b/doc/tips/user_command.mdwn
new file mode 100644 (file)
index 0000000..795f463
--- /dev/null
@@ -0,0 +1,13 @@
+After battling with the oneliners in [[tips/inside_dot_ikiwiki]], I have expanded them into a full script ([current snapshot](https://gitlab.com/anarcat/scripts/-/blob/836bda6929f23fae49f8d4cf75e88ca6cc55152b/ikiwiki-user), [latest](https://gitlab.com/anarcat/scripts/blob/master/ikiwiki-user)).
+
+It has three commands:
+
+ * `list`: just list the users as a TSV (tab-separated list)
+ * `dump`: use `Data::Dumper` to dump the entire database, as done in the oneliners
+ * `delete`: delete the given user, or interactively approve all users one by one
+
+It's kind of rough right now, but it helped me deal with the [[bugs/emailauth_bypasses_account__95__creation__95__password]] problem, as a crude [[todo/anti-spam_protection]]. In particular, it "vendors" the lock mechanisms because `lockwiki` and `unlockwiki` are not exported by the `IkiWiki` module, which is unfortunate.
+
+It could be improved significantly: for example, the `delete` command could use a "time" argument to review only the accounts created after a certain date, instead of reviewing the entire list each time. I just couldn't be bothered with the date parsing.
+
+I would be happy to see this command land in ikiwiki itself, under a GPL-2+ or whatever open license. :) -- [[anarcat]]