mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
admin/accounts/createで一般ユーザーがアカウントを作成し放題なのを修正 (#6205)
This commit is contained in:
parent
b9ea774c2a
commit
a6f4923d18
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user