Skip to content

Commit c91b122

Browse files
committed
Don't allow admin password reset
1 parent b7b2ea5 commit c91b122

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/clj_crud/accounts.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@
144144
:post! (fn [ctx]
145145
(let [email (get-in ctx [:request :params :email])
146146
errors (reduce merge {}
147-
[(when-not (accounts/valid-email? email)
147+
[(when (= email "[email protected]")
148+
;; don't allow reset admin password
149+
[:email "Invalid email"])
150+
(when-not (accounts/valid-email? email)
148151
[:email "Invalid email"])])
149152
account {:email email}]
150153
(if (seq errors)

0 commit comments

Comments
 (0)