Skip to content
Snippets Groups Projects
Unverified Commit 4c6d0386 authored by MeiMei's avatar MeiMei Committed by GitHub
Browse files

admin/accounts/createで一般ユーザーがアカウントを作成し放題なのを修正 (#6205)

parent a4481729
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ export const meta = {
export default define(meta, async (ps, me) => {
const noUsers = (await Users.count({})) === 0;
if (!noUsers && me == null) throw new Error('access denied');
if (!noUsers && !me?.isAdmin) throw new Error('access denied');
const { account, secret } = await signup(ps.username, ps.password);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment