Remove admin account

This commit is contained in:
julien committed 2026-11-02 22:00:14 +01:00
1 parent 4f28a59c7e
commit db316b2914
13 files changed
+372 -144

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
class Netig
private
def require_core_member!(r)
rodauth.require_account
core_member = DB[:members]
.join(:memberships, member_id: :id)
.where(
Sequel[:members][:account_id] => rodauth.account_id,
Sequel[:members][:kind] => "individual",
Sequel[:members][:core_member] => true,
Sequel[:memberships][:status] => "accepted",
Sequel[:memberships][:ended_at] => nil
)
.count
.positive?
return if core_member
r.halt [
403,
{ "Content-Type" => "text/plain; charset=utf-8" },
["Accès interdit."]
]
end
end